Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

Dockerfile for building websites using Hugo

This dockerfile provides Hugo ready container which includs below:

This dockerfile is available in Docker Hub.

Usage

This dockerfile expects that sources are stored on /var/pages.

docker run -t -i --rm \
  -v /path/to/hugo/root:/var/pages:rw \
  kuruma/hugo-site-builder \
  build_html

If you would like to .less files, you need to set additional env LESS.
For example:

docker run -t -i --rm \
  -e "LESS=styles/default.less" \
  -v /path/to/hugo/root:/var/pages:rw \
  kuruma/hugo-site-builder \
  build

build command is compile LESS file before generating websites by Hugo.
If you want to compile LESS file only, you can use build_css command instead of build.

Some additional environments, CONFIG and DST, are also available to change Hugo's parameters.
In below example, hugo is configured by hugo-alternate-config.yaml and output generated files in /var/output.example.org.

docker run -t -i --rm \
  -e "CONFIG=hugo-alternate-config.yaml" \
  -e "DST=/var/output.example.org" \
  -e "LESS=styles/default.less" \
  -v /path/to/hugo/root:/var/pages:rw \
  -v /path/to/www/output.example.org:/var/output.example.org:rw \
  kuruma/hugo-site-builder \
  build

Note

This dockerfile set container's timezone JST.
If you do NOT want to use JST in the container, you should NOT use this dockerfile in its original.

Docker Pull Command
Owner
kuruma
Source Repository