Docker Build

Notes on Dockerfile and building containers

Although building images for Docker is pretty simple, it is easy to end up creating extremely large images which can be easily fixed if the builds are done correctly limiting the final image sizes.

Each section below covers different methods that can be used together to build better images.

Docker Ignore

Limiting what is visible to a build

Use Build Stages

Break up your builds into stages

Stage Ordering

Ordering stages to be more efficient

Installing Packages

Installing Packages efficiently

Cleaning up the build host

Cleaning up after builds

Last modified October 28, 2021: Start docs on building containers (a30e4dc)