Small container images are a reality. This repo shows that without extra effort you can
- run go binaries in an empty image, built
FROM sratch
- have an image size as low as 6MB
- Docker
- Make
make build
The go binary is built with CGO_ENABLED=0
to force a statically linked binary.
make size
will yield output similar to
6.07MB