Interview Prep/Docker/Images, Layers & Storage Drivers

What is `scratch`?

BeginnerConceptImages, Layers & Storage Drivers
Answer

FROM scratch is the empty base image: no shell, no libc, no CA certs, nothing. Used for statically compiled binaries (Go, Rust with musl). Add /etc/ssl/certs/ca-certificates.crt and a non-root /etc/passwd entry by copying them from a builder stage.

All Docker questions Roadmap: Docker & containers

More on Images, Layers & Storage Drivers