Hugo in a docker container
docker run -it --rm -v $(pwd):/hugo solidnerd/hugo
docker run -it --rm -v $(pwd):/hugo -p 1313:1313 solidnerd/hugo server --bind 0.0.0.0
docker build --build-arg HUGO_VERSION=$(cat VERSION) -t "solidnerd/hugo:$(cat VERSION)" .
Here are all possible hugo build args listed.
ARG | Description |
---|---|
HUGO_VERSION |
Sets the used hugo version during the build. Defaults to 0.18 |
HUGO_DOWNLOAD_URL |
Sets the hugo download url during the build. Defaults to https://github.com/gohugio/hugo/releases/download/v$HUGO_VERSION/hugo_"$HUGO_VERSION"_Linux-64bit.tar.gz" |
HUGO_DOWNLOAD_FILE_NAME |
Sets the hugo filename during the build. Defaults to hugo.tar.gz |
If you have any issues feel free to create an issue on GitHub