Introduce the details of Hugo Docker images.
Become a backer or sponsor to support our work.
All images are Alpine and Debian based (with leading debian
).
The minimal image tags (includes Hugo only) are begin with base
(extended edition) or std-base
(standard edition).
Note
The default tag (
latest
,<version>
) is not the smallest, which is due to historical reasons. Additionally, considering backward compatibility, the default tag will remain unchanged.
The default working directory is /src
.
Images | Default user |
---|---|
Without non-root | root |
With non-root | hugo |
hugo
UserRegardless of whether the default user for the image is root or not, all images have a user named hugo
, whose owns the /src
.
Name | UID | Group Name | GID |
---|---|---|---|
hugo | 1000 | hugo | 1000 |
The default command is hugo help
(previously hugo env
) since images tagged with 0.136.2
, which prints help and then exits.
If the entrypoint
command is not a system command inside a container, then it will be treated as a Hugo subcommand.
Example | Command |
---|---|
docker run ... server | docker run ... hugo server |
docker run ... version | docker run ... hugo version |
The hugo server
/server
will bind the 0.0.0.0
by default, unless the --bind
flag is set.
The default shell is ash
on Alpine based images and dash
on Debian based images.