Introducing Docker Hugo - a CircleCI 2.0 Ready Docker Image

Posted on

I’ve created and maintain several websites that are statically-generated with Hugo (including the one you’re reading right now). I build and test these sites with CircleCI. With CircleCI 2.0, the build process is heavily Docker based. I made a Docker image for use with CircleCI that has Hugo to build the site and HTMLProofer to test it.

The repository to create the images can be found on GitHub while the images themselves are on Docker Hub. An example CircleCI config to use this image can be found in the project’s README.

Unlike some Hugo Docker images that are currently floating around, I am maintaining images for the last 3 minor releases of Hugo. This means that your image won’t disappear during the next Hugo release forcing you to upgrade before you are ready.

The Plan

I created this image with building on CircleCI in mind. In the future, I plan to not only make the image better on CircleCI when possible, but make the image easy to use locally with the Docker CLI as well as on Travis CI.

Note: While this image may not be easy to use locally with the Docker CLI yet, CircleCI 2.0 does have a local builds feature which serves the same purpose.

comments powered by Disqus
Share
Share