-
Notifications
You must be signed in to change notification settings - Fork 104
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
Support for multi-arch (x86 + ARM64) images #341
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e0f767d
to
154654a
Compare
Output of image validation tests: $ docker buildx imagetools inspect localhost:5000/debian
Name: localhost:5000/debian:latest
MediaType: application/vnd.oci.image.index.v1+json
Digest: sha256:af49f9f031847e759e42696e137f59b097b684ca6f66071182131ec4b4de0c2c
Manifests:
Name: localhost:5000/debian:latest@sha256:165bf0d9f7914dc7ff6fda8078261ae01148dc90844dd4de267e2dc44bc4862d
MediaType: application/vnd.oci.image.manifest.v1+json
Platform: linux/amd64
Name: localhost:5000/debian:latest@sha256:b17d8ef58109249f4f2c3fb7898a247746b73da6901ef8207d790eaa26733d1b
MediaType: application/vnd.oci.image.manifest.v1+json
Platform: linux/arm64
Name: localhost:5000/debian:latest@sha256:21ef2adc5c204efd0c8fb0b2f9347c1479f4e596a127c9088603fc67fa1d63d8
MediaType: application/vnd.oci.image.manifest.v1+json
Platform: unknown/unknown
Annotations:
vnd.docker.reference.digest: sha256:165bf0d9f7914dc7ff6fda8078261ae01148dc90844dd4de267e2dc44bc4862d
vnd.docker.reference.type: attestation-manifest
Name: localhost:5000/debian:latest@sha256:500514e22018bdda2ede04215c667612c6e3d2da6101454e26e847bbcc4819e9
MediaType: application/vnd.oci.image.manifest.v1+json
Platform: unknown/unknown
Annotations:
vnd.docker.reference.digest: sha256:b17d8ef58109249f4f2c3fb7898a247746b73da6901ef8207d790eaa26733d1b
vnd.docker.reference.type: attestation-manifest $ docker run --rm --platform linux/amd64 localhost:5000/${{ matrix.kind }} sh -c 'file /usr/bin/deno'
/usr/bin/deno: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[xxHash]=2ba84ece8185469d, with debug_info, not stripped $ docker run --rm --platform linux/arm64 localhost:5000/${{ matrix.kind }} sh -c 'file /usr/bin/deno'
/usr/bin/deno: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[xxHash]=432f974974c48879, with debug_info, not stripped |
154654a
to
00e684b
Compare
mmastrac
approved these changes
Feb 13, 2024
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.
LGTM! @littledivy do you want to merge this for the next patch release?
littledivy
approved these changes
Feb 14, 2024
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.
Yup! LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As mentioned in #337, Deno now provides official ARM64 builds. This PR makes the necessary changes for the
denoland/deno
images to be multi-architecture, meaning that a user on an ARM64 or x86 host can pull the same tag and be provided with an image compatible with their architecture.cc @mmastrac @littledivy
Changes
docker save
anddocker load
will only work with single architecture images.bin.dockerfile
to handleTARGETARCH
ubuntu-latest
image. Justification: this build is essentially linking, not compiling, so it's faster if we're not waiting for a big runner to become available.