Building the smallest possible Docker image to deploy a static Jekyll website
473
Building the smallest possible Docker image to deploy a static Jekyll website
docker build -t my-site .
docker run -it -p 8080:80 my-site
Open http://localhost:8080 in your browser.
Because of multi-stage building, 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 a02c7d53f542 3 seconds ago 21.9MB
Content type
Image
Digest
Size
9.4 MB
Last updated
over 5 years ago
docker pull ledermann/docker-jekyll