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.
More on Images, Layers & Storage Drivers
What is a Docker image made of?BeginnerWhat is a layer and when is one created?BeginnerWhat is a union filesystem / OverlayFS?IntermediateWhat is copy-on-write (CoW) in containers?IntermediateWhy does deleting a file in a later `RUN` not shrink the image?IntermediateWhat storage drivers does Docker support and which is default?Intermediate