cheatsheet/docker-slim

August 17, 2021

オプション 効果
—state-path docker-slim の状態が保持されるパス、docker-slim コマンドが書き込めるパスにする
—target 元のイメージ
—tag スリムになったイメージのタグ
—http-probe デフォルトは enable、ただ distcc の場合、HTTP ポートではないので false にしている
—exec docker-slim が動的にアプリケーションの振る舞いを解析する際に実行するシェルスクリプト

time docker build  . -t genpi64-distcc-large:latest
docker-slim --state-path ~/tmp/docker-slim build --target genpi64-distcc-large:latest --tag ghcr.io/tin-machine/genpi64-distcc-docker:latest --http-probe=false --exec "/need.bash"
docker push ghcr.io/tin-machine/genpi64-distcc-docker:latest

参考

オフィシャル


Profile picture

Written by tin-machine 技術関連のメモ Twitter