hugomods-docker/README.md
2023-01-27 23:37:09 +08:00

1.2 KiB

Hugo Docker Image

Docker Pulls Docker Image Version (tag latest semver) Docker Image Size (latest semver)

A up to date Hugo docker image that contains Node, NPM, Git, Go and extended Hugo.

There are two ways to check and build latest Hugo image.

  1. Waiting for the cron job (runs every 30mins).
  2. Trigger the job immediately by commenting on the issue.

All available versions (tags) can be found on https://hub.docker.com/repository/docker/razonyang/hugo/tags?page=1&ordering=last_updated.

Build Image

$ docker build \
  -t razonyang/hugo \
  ./
Argument Description
GOPROXY Go module proxy.
GO_VERSION Go version.
HUGO_VERSION Hugo version.
NODE_VERSION Node version.

Start Hugo Server

$ docker run -p 1313:1313 \
  -v ${PWD}:/src \
  razonyang/hugo \
  hugo server --bind 0.0.0.0

Note that --bind 0.0.0.0 is required.