Support multi-platform
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- docker, dockerfile, github-actions, nodejs, python
- Domain
- build-system, devops
Research direction
Inspect the Dockerfile and the repository's existing image-build configuration, then compare it with the QEMU, Buildx, and build-push-action examples in the issue. Done means the image is built and pushed for amd64, arm64, and ppc64le platforms, with the existing tags preserved.
Written by the indexing model from the issue text.
Description
The comments on the Docker for Mac issue suggests container authors should make containers multi-platform: docker/for-mac#5123 (comment)
By: @stephen-turner
This is a qemu bug, which is the upstream component we use for running Intel (amd64) containers on M1 (arm64) chips, and is unfortunately not something we control. In general, we recommend running arm64 containers on M1 chips because (even ignoring any crashes) they will always be faster and use less memory.
Please encourage the author of this container to supply an arm64 or multi-arch image, not just an Intel one. Now that M1 is a mainstream platform, we think that most container authors will be keen to do this.
Set up QEMU
The docker/setup-qemu action installs QEMU static binaries, which are used to run builders for architectures other than the host.
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
Set up Docker builders
The docker/setup-buildx action configures buildx, which is a Docker CLI plugin that provides enhanced build capabilities. This is the infrastructure that the following step will use for actually building images.
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
Build and push the images
This final step uses the [docker/build-push-action][] to build the images and push them to Docker Hub using the tags we defined in the prep step. In this example, we’re building images for amd64, arm64, and ppc64le architectures.
- name: Build
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/ppc64le
push: true
tags: ${{ steps.prep.outputs.tags }}
References
- Dominant language
- Dockerfile
- Stars
- 1
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bazel-contrib/rules_go#4721 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
agent-research-recommend agent-review-finding chore
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
jordansmall/spindrift#3717 · 1 comment ·
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100