Multi-Stage Dockerfile - CI/CD用語集の定義
Multi-stage Dockerfile は複数の FROM ステージを使い、build ツールを前段のステージにとどめ、最終的な artifact だけを小さな runtime ステージにコピーすることで、出荷する image を軽量に保ちます。
Multi-stage Dockerfile は複数の FROM ステージを使い、build ツールを前段のステージにとどめ、最終的な artifact だけを小さな runtime ステージにコピーすることで、出荷する image を軽量に保ちます。
Multi-stage Dockerfile は複数の FROM ステージを使い、build ツールを前段のステージにとどめ、最終的な artifact だけを小さな runtime ステージにコピーすることで、出荷する image を軽量に保ちます。
CI では
multi-stage build により、1 つの Dockerfile でコンパイル、テスト、パッケージ化を行いながら、非常に小さな production image を生成でき、build 用と runtime 用のファイルを分ける必要がなくなります。
関連ガイド
Base Image - CI/CD Glossary DefinitionBase Image: A base image is the starting image a Dockerfile builds on top of, named in the first `FROM` instr…
Distroless Image - CI/CD Glossary DefinitionDistroless Image: A distroless image contains only the application and its runtime dependencies, with no shel…
Build Context - CI/CD Glossary DefinitionBuild Context: The build context is the set of files sent to the builder when an image is built, usually the…
Layer Caching - CI/CD Glossary DefinitionLayer Caching: Layer caching reuses the results of previously built image layers when their inputs are unchan…