Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Docker イメージのマルチアーキテクチャビルド / docker-muti-arch-b...
Search
shin1x1
December 21, 2021
Programming
1
510
Docker イメージのマルチアーキテクチャビルド / docker-muti-arch-build
shin1x1
December 21, 2021
Tweet
Share
More Decks by shin1x1
See All by shin1x1
抽象化という思考のツール - 開発現場での活用 - / Abstraction-as-a-Tool-for-Thinking-in-dev
shin1x1
0
110
抽象化という思考のツール - 理解と活用 - / Abstraction-as-a-Tool-for-Thinking
shin1x1
1
1.1k
php-fpm がリクエスト処理する仕組みを追う / Tracing-How-php-fpm-Handles-Requests
shin1x1
6
3.7k
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
3
2.2k
PHPコードの実行モデルを理解する / Understanding-the-PHP-Execution-Model
shin1x1
2
2.8k
制約の力 - 状態を限定する -
shin1x1
6
5.4k
Apple Silicon Mac 時代の PHP 開発環境構築 2021 / php-dev-env-on-m1-mac-era
shin1x1
2
4.8k
Domain modeling with PHP / domain-modeling-with-php-en
shin1x1
1
290
ドメインをモデリングしてPHPコードに落とし込む / domain-modeling-with-php8
shin1x1
15
7.4k
Other Decks in Programming
See All in Programming
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
2
780
AI 駆動開発におけるコミュニティと AWS CDK の価値
konokenj
4
120
CSC509 Lecture 05
javiergs
PRO
0
310
CSC509 Lecture 06
javiergs
PRO
0
260
Devoxx BE - Local Development in the AI Era
kdubois
0
130
CSC509 Lecture 08
javiergs
PRO
0
230
EMこそClaude Codeでコード調査しよう
shibayu36
0
320
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
390
Go言語の特性を活かした公式MCP SDKの設計
hond0413
1
440
Go言語はstack overflowの夢を見るか?
logica0419
0
510
SODA - FACT BOOK(JP)
sodainc
1
8.6k
Foundation Modelsを実装日本語学習アプリを作ってみた!
hypebeans
1
120
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
40
2.1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.7k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
Rails Girls Zürich Keynote
gr2m
95
14k
The Cult of Friendly URLs
andyhume
79
6.6k
Writing Fast Ruby
sferik
629
62k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Build your cross-platform service in a week with App Engine
jlugia
232
18k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Designing for Performance
lara
610
69k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Transcript
Docker イメージのマルチアーキテクチャビルド 2021/12/21 @shin1x1
Docker イメージ linux/amd64: Intel Mac で利用するイメージ linux/arm64: Apple Silion Mac
で利用するイメージ 異なるアーキテクチャイメージもいちおう動作するが、 動作が遅くなったり、挙動が不安になるケースも 動作する環境に合わせたイメージを作ろう! 2
Docker Buildx によるマルチアーキテクチャビルド https://docs.docker.com/buildx/working-with-buildx/ 3
ビルドする Dockerfile FROM debian:bullseye CMD uname -m Docker イメージビルド &
プッシュ $ docker buildx build --platform linux/amd64,linux/arm64 \ -t shin1x1/sample --push . --platform でターゲットを指定 --push で Docker Hub への push も同時に行う 4
できた! 5
M1 Mac で実行すると aarch64 を出力 $ docker run --rm shin1x1/sample
aarch64 --platform オプションで amd64 イメージを実行 $ docker run --rm --platform linux/amd64 shin1x1/sample x86_64 6
詳細は blog で https://blog.shin1x1.com/entry/docker-multi-arch-build-on-github-actions 7