Public | Automated Build

Last pushed: 13 days ago
Short Description
The smallest hugo image built from Alpine.
Full Description


The smallest hugo image built from Alpine.


docker pull yanqd0/hugo


There are two simple ways to use the image when developing,
docker run or docker-compose up.

(If you want to know the usage of hugo, please visit

docker run

As the help of hugo server says:

Hugo provides its own webserver which builds and serves the site.
While hugo server is high performance, it is a webserver with limited options.
Many run it in production, but the standard behavior is for people to use it
in development and use a more full featured server such as Nginx or Caddy.

hugo server will avoid writing the rendered and served content to disk,
preferring to store it in memory.

The default command of this docker image is hugo server.

When generating the public directory in the production environment,
please specify the command to hugo.

docker run --rm -v $PWD:/srv/hugo yanqd0/hugo hugo

If the current directory is not the hugo project, you can replace $PWD with the path.

docker-compose up

It may not be a convenient way to use docker run in the development environment.

I prefer to use a docker-compose.yml file.

You can write a docker-compose.yml in your hugo project like this:

version: '3'

    image: yanqd0/hugo
      - .:/srv/hugo
      - 1313:1313

And then, run docker-compose up -d.

There is a verified docker-compose.yml for example.


Name Version
Alpine 3.7
Hugo 0.37.1
Git 2.15.0

It is welcome to remind me about updates by issues.


Status Size
Extracted 36.3 MB

I use the official releases instead of compiling from source, so the image is very small.


MIT License

Copyright (c) 2017 Yan QiDong

Docker Pull Command
Source Repository