Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build V 17.0 on ARM64 #610

Open
bosd opened this issue May 12, 2024 · 4 comments
Open

Cannot build V 17.0 on ARM64 #610

bosd opened this issue May 12, 2024 · 4 comments
Labels

Comments

@bosd
Copy link

bosd commented May 12, 2024

Describe the bug

Unable to build on a ARM vps.

To Reproduce

Affected versions:

Steps to reproduce the behavior:

  1. Setup a project with the copier template
  2. inv img-build

See


WARN[0000] /root/sarm/docker-compose.yml: `version` is obsolete 
[+] Building 0.7s (6/9)                                                                                                  docker:default
 => [odoo internal] load build definition from Dockerfile                                                                          0.0s
 => => transferring dockerfile: 108B                                                                                               0.0s
 => [odoo internal] load metadata for ghcr.io/tecnativa/doodba:17.0-onbuild                                                        0.4s
 => [odoo internal] load .dockerignore                                                                                             0.0s
 => => transferring context: 159B                                                                                                  0.0s
 => CACHED [odoo 1/1] FROM ghcr.io/tecnativa/doodba:17.0-onbuild@sha256:5a97edffb93b96a55894278221554dbbd95bf2fd0d61313f6f53fdc63  0.0s
 => ERROR [odoo 2/1] RUN groupadd -g 0 odoo -o     && useradd -l -md /home/odoo -s /bin/false -u 0 -g 0 odoo     && mkdir -p /var  0.2s
 => CANCELED [odoo internal] load build context                                                                                    0.2s
 => => transferring context: 702B                                                                                                  0.2s
------                                                                                                                                  
 > [odoo 2/1] RUN groupadd -g 0 odoo -o     && useradd -l -md /home/odoo -s /bin/false -u 0 -g 0 odoo     && mkdir -p /var/lib/odoo     && chown -R odoo:odoo /var/lib/odoo /qa/artifacts     && chmod a=rwX /qa/artifacts     && sync:
0.160 exec /bin/sh: exec format error
------
failed to solve: process "/bin/sh -c groupadd -g $GID odoo -o     && useradd -l -md /home/odoo -s /bin/false -u $UID -g $GID odoo     && mkdir -p /var/lib/odoo     && chown -R odoo:odoo /var/lib/odoo /qa/artifacts     && chmod a=rwX /qa/artifacts     && sync" did not complete successfully: exit code: 1

Expected behavior
An running doodba iage.

Additional context
Docker version 26.0.0, build 2ae903e
Ubuntu 24.04 LTS
aarch64

@bosd bosd added the bug label May 12, 2024
@bosd
Copy link
Author

bosd commented May 12, 2024

Even tried
export DOCKER_DEFAULT_PLATFORM=linux/arm64/v8 && docker compose -f prod.yaml up
It got passed the previous error.
But now there is an enldess:
db-1 | exec /autoconf-entrypoint: exec format error

@pedrobaeza
Copy link
Member

Not an expert on ARM. Maybe @PCatinean can say anything about this.

@ap-wtioit
Copy link
Contributor

ap-wtioit commented May 13, 2024

@bosd your reported error looks like it's coming from the postgres image, have you checked if there is an arm version available?

Update: ok there should be plenty of images in the dockerhub postgres for arm: https://hub.docker.com/_/postgres/tags but https://hub.docker.com/r/tecnativa/postgres-autoconf/tags doesn't have arm tags. Can you switch https://github.com/Tecnativa/doodba-scaffolding/blob/master/common.yaml#L31 to image: postgres:${DB_VERSION}-alpine

@bosd
Copy link
Author

bosd commented May 13, 2024

@ap-wtioit Thanks for the pointer.
Found out there was a specific image for arm64/v8 which was unavailable in the main repo.
So changing the line to:

image: arm64v8/postgres:15-alpine

Fixed it.
IDK, how and if this should be incorporated into the template.

FYI: Still not having a complete arm production setup runing.
Still trying to get the inverseproxy up and running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants