dockerignore - CI/CD用語集の定義
.dockerignore ファイルは、build context が builder に送られる前に除外するパスを、.gitignore と同じように列挙します。シークレットや node_modules、.git をイメージから除外し、build を高速化します。
.dockerignore ファイルは、build context が builder に送られる前に除外するパスを、.gitignore と同じように列挙します。シークレットや node_modules、.git をイメージから除外し、build を高速化します。
.dockerignore ファイルは、build context が builder に送られる前に除外するパスを、.gitignore と同じように列挙します。シークレットや node_modules、.git をイメージから除外し、build を高速化します。
なぜ重要か
大きなディレクトリや機密性の高いディレクトリを除外すると、CI での context 転送時間が短縮され、ローカルファイルが誤って layer に混入するのを防げます。
関連ガイド
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…
Multi-Stage Dockerfile - CI/CD Glossary DefinitionMulti-Stage Dockerfile: A multi-stage Dockerfile uses several `FROM` stages so build tooling stays in an earl…
Container Image - CI/CD Glossary DefinitionContainer Image: A container image is a read-only, layered package that bundles an application with its runti…