Companion to Docker: A Minimalist's Choice
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Demo: Jekyll + nginx proxy via Docker

This has been tried and tested on Mac OS X. It should work on Linux as well. However, Windows is not guranteed, as Jekyll does not officially support it.


  • Ruby 2.0+
  • Python 2.7+
  • NodeJS v0.12.* with npm v2.0+
  • Bower. (get via npm install -g bower)
  • Docker (you can get it through Docker Toolbox)

Getting Started

Run the following commands on the project root:

> bundle install --path vendor/bundle
> npm install && bower install

Get your local IP address and set it as the LOCAL_IP environment variable:

> export LOCAL_IP=

This IP address should be what Docker can use to talk to your host machine. should be what it is for a default install of Docker.

Serving the static site


> grunt serve

Once complete, a browser window should eventually open up pointing to http://localhost:8080.

To hit the proxy, you will have to access the site through

Test the following redirects to see it in action: => =>

The first redirect is configured in _config.yml. The second one is in app/_posts/

Grunt config & tasks

The grunt proxy task is the entry task that orchestrates the building and running of the nginx proxy. Checkout the Gruntfile.js file for how it is done. Its a rather long file (~300 lines), so I added @notes in comments preceeding all pertinent parts.

Majority of the implementation can be found in grunt/tasks/nginx-proxy/index.js.


You can find more info about this module here:


For questions, comments, and feedbacks, you can shoot me an email at