docker optimization guide

last updated: Oct 20, 2023

https://www.augmentedmind.de/2022/02/06/optimize-docker-image-size/

Choose a suitable base image

Multi-stage builds

Consolidate RUN commands

Squash image layers

Save space when installing dependencies

Avoid superfluous chowns

Use .dockerignore files

Use the docker-slim tool

↑ up