| オプション | 効果 |
|---|---|
| —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