Image Overview: hugo

Overview: hugo Chainguard Image

This is a minimal Hugo image.

Download this Image

The image is available on

docker pull

Compatibility Notes

This image only contains hugo and supporting libraries. The Hugo process starts in /hugo by default so this directory may be initialized with the Hugo site to serve.

Application Setup for End Users

The following is an example of using the Hugo image locally. It’s based on the official Hugo “quickstart” example.

To begin, start a shell in the Hugo developer (dev) container.

docker run -v $PWD/data:/home/data --entrypoint=/bin/sh -p 8080:8080 -it \

Create a new Hugo site using the quickstart commands.

hugo new site quickstart

Navigate into the new site’s root directory.

cd quickstart

Initiate an empty Git repository

git init

Clone a Hugo theme into the themes directory.

git submodule add themes/ananke

Add a line to the site’s configuration file to let Hugo know to use the new theme.

echo "theme = 'ananke'" >> hugo.toml

Start the Hugo development server to serve the site. Be sure to change the default bind address and port to make the site accessible outside of the container.

hugo serve --bind --port 8080

Now open your browser to localhost:8080 to visit the sample site.

When finished, you can press CTRL + C to stop the Hugo server from running, and then CTRL + D to exit the container shell.

If you’re interested in enterprise support, SLAs, and access to older tags, get in touch.

Last updated: 2024-04-11 12:38