Multi-stage Docker build of a minimal container.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Multistage Scratch Non-Privileged

This demonstrates a multi-stage docker build to create a scratch container, running as a non-privileged user.

The aim is to create a tiny image, with no exta files, and only one non-privileged, nobody user, with the ability to use SSL.


To build the image:

docker build --tag multistage .

To run the image:

docker run -it multistage

To make a request:

curl localhost:7000/google


If you'd like to walk through the steps that go into creating this image, there is a demonstration repository here. The built image can be found on Docker Hub and there's an accompanying blog post too.