This example demonstrates the use of Docker multi-stage builds to create a smallest "Hello Docker World" container. The resulting docker container is only 512 Byte, compared to 156 MB of full alpine:latest alpine base image with build environment.
It is used for testing and training.
Note: You will need docker a version higher or equal to 17.05 use the multi-stage build.
docker build -t hello-docker-world .
docker run --ti --rm hello-docker-world