Support multi-platform

オープン
#2 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
docker, dockerfile, github-actions, nodejs, python

調査の方向性

Dockerfile とリポジトリに既存するイメージビルド設定を調査し、issue にある QEMU、Buildx、build-push-action の例と比較します。amd64、arm64、ppc64le プラットフォーム向けにイメージがビルドおよびプッシュされ、既存のタグが維持されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug Hacktoberfest help wanted

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 はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

似ている issue

Build System の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。