Public Repository

Last pushed: 6 days ago
Short Description
Docker image for Hugo, the static-site generator. Includes HTMLProofer for testing.
Full Description

Docker Hugo

Update This image will be superseded soon by an Alpine-based image (rather than this Debian based image). To switch over to that new image, please use That image and this one are currently duplicates, but that one will change in October 2017 to an alpine based image. The commands for the CLI tools (such as Hugo and HTMLProofer) will remain the same.

A Docker image for Hugo, a static-site generator. Includes HTMLProofer for testing. Hosted on Docker Hub.

Currently, this Docker image is designed to be used as a base image on CircleCI 2.0 for building, testing, and deploying Hugo based websites.

I plan to make this image useful for local testing and build/test/deploy on Travis CI as well in the future.

Using on CircleCI

Using this image to build your Hugo generated website on CircleCI 2.0 can be as simple as using the following configuration in .circleci/config.yml:

version: 2
      - image: felicianotech/docker-hugo:0.22.1
    working_directory: ~/project
      - checkout
      - run:
          name: "Run Hugo"
          command: HUGO_ENV=production hugo -v -s src/
      - run:
          name: "Test Website"
          command: htmlproofer src/public --allow-hash-href --check-html --empty-alt-ignore --disable-external

In this example, we assume the Hugo files are in a directory called src in the repo. A full walkthrough on how to do this can be found on CircleCI's blog.

Building The Images

To prepare new images, I run ./ locally, passing it the current Hugo versions that I am "supporting". For example, for the initial release, I ran ./ 0.18.1 0.19.

I then commit the resulting files and push up to GitHub. CircleCI builds everything and publishes the new Docker images to Docker Hub.

Websites Using This & Examples

The following sites use Hugo and this image (and some have their config public):

Feedback & Contributing

Please feel free to open GitHub Issues for any questions, bugs, request, etc. You can also write a new post on Hugo's forum and ping me, FelicianoTech. Pull Request welcome as well.

Docker Pull Command