在GitHub工作流中构建i386镜像。

huangapple go评论55阅读模式
英文:

Build i386 image in GitHub workflow

问题

这个指南介绍了如何选择GitHub工作流程的运行环境(例如ubuntu-22.04)。是否有一种方法可以指定运行环境的处理器架构?我的GitHub工作流程会构建并推送Docker镜像到Docker Hub,我想创建i386和x86_64两种架构的镜像。

英文:

I've been looking over this guide on how to choose the runner for a GitHub workflow (e.g., ubuntu-22.04).

Is there a way to specify the processor architecture of the runner? My GitHub workflow builds and pushes a Docker image to Docker Hub and I'd like to create both i386 and x86_64 images.

答案1

得分: 2

对于构建多架构的 Docker 镜像,您可以参考GitHub Actions 中的多平台镜像。它使用docker/build-push-action。您可以使用它的platforms输入参数来指定不同的平台和架构。

英文:

For building multi-arch docker images, you can follow Multi-platform image with GitHub Actions. It uses docker/build-push-action. You can use its platforms input parameter to specify different platforms and architectures.

huangapple
  • 本文由 发表于 2023年5月7日 08:32:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/76191759.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定