A Fast and Flexible Static Site Generator built with love in GoLang http://gohugo.io
610
This image is based on official Alpine lightweight Docker image.
In order to build this image to need to pass the version of Hugo that you want to install in the container.
$ docker --build-arg HUGO_VERSION=0.20.1 build -t mongrelion/hugo:0.20.1
Make sure that when you run the container you mount your Hugo site to /usr/share/hugo. For the rest,
you can call any of the available Hugo commands.
Here is an example on running the Hugo server:
$ docker run --rm -it -p 1313:1313 -v $PWD:/usr/share/hugo mongrelion/hugo:0.20.1 server --bind 0.0.0.0
Notice that we're asking Hugo to bind to the 0.0.0.0 interface because by default it binds itself to
127.0.0.1, rejecting all the connections coming outside of the container.
To generate your site simply
$ docker run --rm -it -v $PWD:/usr/share/hugo mongrelion/hugo:0.20.1
This should produce the contents of your website under the public/ directory.
Content type
Image
Digest
Size
28 MB
Last updated
about 9 years ago
docker pull mongrelion/hugo