0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

dockerをマルチプラットフォーム用にビルドする

Last updated at Posted at 2023-08-27

目的

dockerを異なるアーキテクチャ間で用いる場合に少し苦労したので、備忘録を残す

準備

最初の状態ではマルチプラットフォームビルドに対応していない

docker buildx create --use

ビルド

docker buildx build --platform linux/amd64,linux/arm64 .

platformの例

  • linux/amd64
  • linux/arm64
  • linux/arm/v7
  • darwin

コンテキストを指定する事も出来る

docker buildx build --build-context project=path/to/project/source .
# docker buildx build --build-context project=https://github.com/myuser/project.git .
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?