Skip to content
Deploying Jekyll using Docker

Deploying Jekyll using Docker

To build the website of Octoperf, our load testing tool, we use Jekyll. I also use it for this website.

It's great to generate static content, hosted on Amazon S3 like OctoPerf or on Github for this blog. But we had trouble upgrading jekyll to version 3 on our build server. We use plugin that are not yet available for this version. So we had to revert back to 2.5.

Docker to the rescue

The whole process took us time. So I decided to use Docker to build, optimize and deploy our website. Now all we need is Docker installed on our build server and available in Jenkins, the Continuous Integration tool we use.

I wrote a simple script that:

Need professional services?
Rely on our Expertise


docker run --rm -i -p $(docker-machine ip `docker-machine active`):4000:4000 -v=$WORKSPACE:/srv/jekyll jekyll/jekyll:2.5.3 /bin/sh -c "jekyll build"
cd $WORKSPACE/_site
find . -name "*.png" | xargs docker run --rm -v=$WORKSPACE/_site:/source buffcode/docker-optipng -o4
docker run --rm -i -v=$WORKSPACE/_site:/website -v=$WORKSPACE/conf:/config attensee/s3_website push --config-dir /config --site /website

Using Docker, we don't need to maintain installations of ruby, rvm, gems, jekyll and so on. The build process may take a bit longer, but that's not a big issue. I even started to use this solution on my laptop, to build the website locally.

Want to become a super load tester?
Request a Demo