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

Odoo: Build for arm64 too #15362

Closed
wants to merge 2 commits into from
Closed

Conversation

samip5
Copy link

@samip5 samip5 commented Sep 14, 2023

I believe this should be just a matter of including them here.

@github-actions
Copy link

Diff for 65a00a6:
diff --git a/_bashbrew-arches b/_bashbrew-arches
index 21d5bd8..e85a97f 100644
--- a/_bashbrew-arches
+++ b/_bashbrew-arches
@@ -1 +1,2 @@
 amd64
+arm64v8
diff --git a/_bashbrew-cat b/_bashbrew-cat
index 3137fa7..08420bc 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -3,10 +3,13 @@ GitRepo: https://github.com/odoo/docker
 GitCommit: 61148a86eed7fb5452dc7705b479988e1f49f9a6
 
 Tags: 14.0, 14
+Architectures: amd64, arm64v8
 Directory: 14.0
 
 Tags: 15.0, 15
+Architectures: amd64, arm64v8
 Directory: 15.0
 
 Tags: 16.0, 16, latest
+Architectures: amd64, arm64v8
 Directory: 16.0

Relevant Maintainers:

@samip5 samip5 changed the title Odoo: Update architecture field to include arm64 Odoo: Build for arm64 too Sep 14, 2023
@derfl0
Copy link

derfl0 commented Sep 14, 2023

I don't want to break your enthusiasm @samip5 but running an amd64 packet on arm64 will not work:
https://github.com/odoo/docker/blob/master/16.0/Dockerfile#L36

@samip5
Copy link
Author

samip5 commented Sep 14, 2023

I don't want to break your enthusiasm @samip5 but running an amd64 packet on arm64 will not work: https://github.com/odoo/docker/blob/master/16.0/Dockerfile#L36

Yeah, just noticed that and I also noticed that odoo/docker#410 (comment) which means @d-fence might not want to use the version that's available for arm64 :(

There's also an PR for fixing that at least for Odoo 16:

@yosifkit
Copy link
Member

Without the Odoo Dockerfiles being updated to support building on multiple architectures, this PR will not work. As for odoo/docker#464, that is only part of a fix since it would then fail to build on amd64. It is up to the Odoo image maintainer, @d-fence, but it would likely need something like this section in the golang Dockerfile that uses dpkg to get the userspace architecture and then chooses the architecture-specific item to download:

https://github.com/docker-library/golang/blob/18778673d05af968094fe71d45dfd7fbf1856b65/1.21/bookworm/Dockerfile#L26-L79


A simple way to test architectures that you do not have access to is to use Docker Desktop (and it sets up qemu): docker build --platform=linux/arm64 16.0/. Alternatively, installing binfmt-support and qemu-user-static in a Debian host OS running Docker and you can do the same docker build --platform. We have seen issues when using qemu user static to emulate other architectures, so while it isn't a full replacement for actual hardware 😢, it is still helpful if you don't have them.

@yosifkit yosifkit closed this Sep 14, 2023
@ludovic-gasc
Copy link

The support of ARM for Odoo is now available if you want to test: https://hub.docker.com/search?q=odoo&image_filter=official

@samip5 samip5 deleted the odoo-multiarch branch November 8, 2023 18:41
@rfc2119
Copy link

rfc2119 commented Aug 28, 2024

@ludovic-gasc Any idea how are the images built for arm64 ? I don't think the current Dockerfile is multiarch

@tianon
Copy link
Member

tianon commented Aug 28, 2024

The current Dockerfile is multiarch (and built for multiarch):

$ crane manifest odoo | jq '.manifests[].platform | select(.os != "unknown")'
{
  "architecture": "amd64",
  "os": "linux"
}
{
  "architecture": "arm64",
  "os": "linux",
  "variant": "v8"
}
{
  "architecture": "ppc64le",
  "os": "linux"
}

@rfc2119
Copy link

rfc2119 commented Aug 29, 2024

Yes, but I don't see how this line will fit for both arm64 and amd64 packages from the nightly archive
https://github.com/odoo/docker/blob/b6411dfc5391faaa18a0e12951adcbc3469c2a30/17.0/Dockerfile#L76

@samip5
Copy link
Author

samip5 commented Aug 29, 2024

Yes, but I don't see how this line will fit for both arm64 and amd64 packages from the nightly archive https://github.com/odoo/docker/blob/b6411dfc5391faaa18a0e12951adcbc3469c2a30/17.0/Dockerfile#L76

It's the way the Docker's build system uses targetarch ARG, and builds it according to that, so you'll not see arch specific instructions in most cases.
That deb package also is not arch specific as the thing packaged is a Python application.

@rfc2119
Copy link

rfc2119 commented Aug 29, 2024

That deb package also is not arch specific as the thing packaged is a Python application.

TIL. Interesting.

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

Successfully merging this pull request may close these issues.

7 participants