Skip to content
Docker image of Hugo (Hugo extended and Hugo Modules)
Dockerfile Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
images
.dockerignore
.gitignore
Dockerfile
LICENSE
README.md
entrypoint.sh

README.md

license release GitHub release date GitHub Actions status

Docker image of Hugo extended version

Docker image of Hugo (Hugo extended and Hugo Modules)

Docker Hub Build Status docker image size

DockerHub Badge

Getting started

Pull docker image

# small image
export HUGO_DOCKER_TAG="v0.57.2"
# large image for Hugo Modules (Golang and Git are installed)
export HUGO_DOCKER_TAG="${HUGO_DOCKER_TAG}-mod"

docker pull peaceiris/hugo:${HUGO_DOCKER_TAG}

Usage

# Run "hugo server"
docker run --rm -i -t -v $(pwd):/src -p 1313:1313 peaceiris/hugo:${HUGO_DOCKER_TAG} server

# Run with flags
docker run --rm -i -t -v $(pwd):/src -p 1313:1313 peaceiris/hugo:${HUGO_DOCKER_TAG} --gc --minify --cleanDestinationDir
You can’t perform that action at this time.