-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Multi-Arch image #102
Comments
Could this include the arch string in the miniforge download URL? docker-images/miniforge3/Dockerfile Line 25 in 8ae623a
https://github.com/conda-forge/miniforge/releases
How to make the Dockerfile pass the arch through to be templated into the miniforge release URL?
...
|
That seems like a question to raise on the miniforge issue tracker. |
FWIU, there's nothing that needs to change in miniforge to make this happen. docker-images/miniforge3/Dockerfile Line 25 in 8ae623a
Multi-arch images (including miniforge images) could be created with This would default to x86_64: ARG TARGET_CPU_ARCH="x86_64"
RUN wget --no-hsts --quiet "https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/Miniforge3-${MINIFORGE_VERSION}-Linux-${TARGET_CPU_ARCH}.sh" -O /tmp/miniforge.sh && \ We could specify a different arch by specifying a different value for TARGET_CPU_ARCH: docker build --build-arg TARGET_CPU_ARG="aarch64" .
The new way to accomplish this (that only works with buildkit/docker AFAIU?) is with the export DOCKER_BUILDKIT=1
docker build --platform linux/amd64
docker build --platform linux/arm64
docker build --platform=linux/amd64,linux/arm64,linux/arm/v7 .
docker build --platform=darwin . RUN wget --no-hsts --quiet "https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/Miniforge3-${MINIFORGE_VERSION}-Linux-${TARGETARCH}.sh" -O /tmp/miniforge.sh && \
It looks like TARGETARCH is not quite what we're looking for in order to get |
|
I'm assuming that |
Is there still an interest to merge |
Here is PR in my fork that builds a multi-arch image for And a second PR that uses a matrix to build multi-arch images for CentOS 7 and AlmaLinux 8 - https://github.com/martin-g/docker-images/pull/2/files |
Thanks for your interest Martin! 🙏 Think what we would want to do is create a GHA step after the existing Docker builds that pulled the different architecture builds into multiarch images that also get pushed. IOW we could use That way users can still retrieve images under the existing names, we still are able to parallelize/separate arch builds, and the end result maps nicely on to our existing images Am curious to hear your thoughts on this approach 🙂 |
I've never done this before but I will be glad to learn something new! Let me investigate! |
Worked like a charm: I did it in a separate workflow file because I didn't want to wait for the whole build of all images in ci.yaml, but the build job must be in the ci.yaml and should declare a dependency on the |
No, this is not a blocker. There might be interest in keep arch-specific named-images, see #242 (comment) (cc @xhochy). |
Yep Marcel think we are proposing the same thing 🤝, which it appears Martin has done 👍 Given your working experiment Martin, would you be interested in submitting a PR? 🙂 |
Sure! I was waiting for confirmation that this is what is preferred! |
You can see an almost finished WIP at https://github.com/martin-g/docker-images/pull/4/files |
Am interested in seeing how we can standardize the images here a bit and consolidate maintenance effort. In particular am curious how we can make a multi-arch image. There's a good blogpost on this topic. It would be good to determine what the current issues prompting the different images we have are and how we address those issues in a general way that benefits all of the images here.
The text was updated successfully, but these errors were encountered: