A minimal base image contains only the operating-system files and runtime components an application needs. In a multi-stage Dockerfile, compiled application artifacts move from a tool-rich builder image into this smaller final image. section 4.4
A practical minimal-image workflow:
- Copy the binary and required application files, then mark the binary executable on Linux. section 4.4
Image-size comparison
The Go toolset image is 230 MB, while the resulting image-gallery application image is 35.1 MB. Choosing a minimal final base image keeps compiler tools out of the runtime image. section 4.4
