-
Notifications
You must be signed in to change notification settings - Fork 176
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
Dockerfile: build arm64 variants #449
Conversation
985345f
to
a92502f
Compare
Make it possible to build both amd64 and arm64 Docker images. This can be done with: docker build --platform linux/amd64,linux/arm64 --tag pwru . Signed-off-by: Albin Kerouanton <albinker@gmail.com>
When deb pkg 'gcc' is installed, arch-specific symlinks are created (eg. x86_64-linux-gnu-gcc). Change the release script to use the x86 symlink instead of 'gcc'. That way, amd64 can be built from arm64 machine. Signed-off-by: Albin Kerouanton <albinker@gmail.com>
a92502f
to
e91a7f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@brb You know this better than me, how do you like it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@akerouanton I was informed by @aanm that Docker Hub, where we publish |
What do you mean @aanm? Docker Hub itself does support multi-arch images. For instance: https://hub.docker.com/r/albinkerouanton006/pwru/tags. |
@brb @akerouanton what I meant was that hub.docker.com does not build multi-arch images but it's fine to publish. |
@aanm I see. I think a build hook could do the job, but Cilium needs to have either a Docker Pro, Team, or Business subscription as is noted at the top of that doc page. Is that the case? |
@akerouanton no, that's not the case. All multi-arch builds that Cilium has are done via GitHub actions. For example here |
Make it possible to build both amd64 and arm64 Docker images. This can be done with:
GHA release workflow only handles GH release artifacts, so the out-of-tree CI job or manual process used to publish images on Docker Hub will have to be updated accordingly.
Also, fix the release script used during image build to support cross-compilation of amd64 on arm64 machines.
(Note that a standalone Docker Engine has to be configured with the containerd snapshotter enabled to build multi-arch images. See https://docs.docker.com/engine/storage/containerd/)