Distrolessイメージとは?
distrolessイメージは、shell、パッケージマネージャー、通常のLinuxディストリビューションのユーティリティを省き、アプリケーションと不可欠な実行時依存関係だけに絞り込んだコンテナイメージです。結果として最小限で堅牢なイメージになります。shellやツール群がないため、内部に侵入した攻撃者は悪用できる道具がはるかに少なくなります。
なぜ重要か
イメージ内の余分なバイナリはすべて潜在的な攻撃対象領域であり、パッチを当てるべき対象が増えることを意味します。distrolessイメージはその領域を劇的に縮小し、脆弱性の数を減らします。distrolessイメージはmulti-stage buildと自然に相性がよく、buildステージには完全なツールがあり、実行時のartifactだけが最終のdistrolessステージに残ります。
関連する概念
- shellやパッケージマネージャーを含まない
- 攻撃対象領域が小さくCVEが少ない
- multi-stage buildで構築する
関連ガイド
What Is a Base Image?A base image is the starting container image a build extends with FROM, providing the OS and runtime foundati…
What Is a Multi-Stage Build?A multi-stage build uses several stages in one Dockerfile to compile in a heavy stage but ship only the slim…
What Is the Principle of Least Privilege?Least privilege means granting every user, job, or token only the minimum permissions needed to do its task a…