Support multi-platform
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 38/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- docker, dockerfile, github-actions, nodejs, python
- 领域
- build-system, devops
调研方向
检查 Dockerfile 和仓库现有的镜像构建配置,然后将其与 issue 中的 QEMU、Buildx 和 build-push-action 示例进行比较。当镜像针对 amd64、arm64 和 ppc64le 平台完成构建并推送,同时保留现有标签时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Dockerfile
- 星标
- 1
- 派生
- 5
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
相似的 Issue
-
type/automation type/tech-debt
难度 2/5 1-3 小时 新手友好度 78/100
-
priority: p3
难度 2/5 1-3 小时 新手友好度 72/100
googleapis/librarian#7636 ·
-
Bug v3
难度 2/5 1-3 小时 新手友好度 86/100
-
package-update
难度 2/5 1-3 小时 新手友好度 72/100
oSoWoSo/vOid_Community_repOsitory#147 · 1 条评论 ·
-
Builders
难度 2/5 1-3 小时 新手友好度 72/100