Building the smallest possible Docker image (based on nginx:stable-alpine) to deploy a static Jekyll website
jekyll build
docker build -t my-site .
docker run -it -p 8080:80 my-siteOpen http://localhost:8080 in your browser.
The resulting image contains only nginx and the HTML code. No Ruby, no build stuff - ready to ship to your Docker host.
Look at the image size:
$ docker images | grep my-site
my-site latest 9d3ab37ef5d8 3 seconds ago 22.7MB