Source to build hugo docker images
Results of automated builds can be found on Docker Hub
There are two options mainly: use the image bare just as a containerized hugo or build on top.
docker run -ti --rm =p 1313:1313 -v /path/to/my/hugo/site:/website rira12621/hugo-docker hugo serve --source /website --bind=0.0.0.0
Like with any other image you can use FROM
and then build accordingly:
FROM rira12621/hugo-docker
WORKDIR /website
ADD . .
ENV HUGO_BIND="0.0.0.0"
EXPOSE 1313
CMD ["sh", "-c", "hugo serve --bind=${HUGO_BIND}"]