Docker image to run Hugo static site generator with multi-arch builds.
1.6K
This is a Alpine based Docker image used to wrap Hugo
Builds are automated from bdebyl/docker-hugo tags using GitLab pipelines.
The basic entrypoint of the docker image is the hugo binary. This means it's
as simple as running the following command (for help):
docker run bdebyl/hugo help
Note: It is recommended to append the --rm option after docker run to
keep things clean, or naming your container appropriately for re-use.
The following example should be used for reference when running the server with all necessary options:
docker run -it --rm --user $(id -u $USER):$(id -g $USER) -v /home/bastian/src/bdebyl-site:/src -p 1313:1313/tcp bdebyl/hugo server --bind=0.0.0.0
To run the server, it's key to recall Hugo's bind interface and specify it appropriately.
Example:
docker run bdebyl/hugo server --bind=0.0.0.0
The image only exposes Hugo's default port of 1313. Make sure to expose it
during runtime.
The image expects source code for a Hugo site, including a theme, to be mounted
to the containers /src directory. This could be done via:
docker run -v /absolute/path/to/source:/src bdebyl/hugo
Example Source Directory Structure:
.
├── config.toml
├── content
│ └── post
└── themes
└── theme_name
Content type
Image
Digest
Size
38.3 MB
Last updated
about 6 years ago
docker pull bdebyl/hugo