Jekyll Docker container for Github Pages
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.
Dockerfile Fix Dockerfile - ensure stability Mar 26, 2018 update readme Mar 26, 2018
docker-compose.yml Update to new github username Mar 7, 2016

Jekyll Docker Container

An optimized jekyll docker image (etelej/jekyll) for building Jekyll containers for Github Pages. Helpful in developing manually built Jekyll Github Pages without much overhead, or having to install Jekyll's multiple dependencies.

Creating the Jekyll container:

Simply run this command from within your githubpages directory:

docker run --rm -it -p 4000:4000 -v "$PWD":/app -w /app etelej/jekyll 

How it works:

This creates a disposable container (--rm), emulates an interactive terminal (-it), forwards host's port 4000 to container's port 4000 (-p 4000:4000 ), maps working directory on host to a read-write volume in container (-v "$PWD":/app), sets the mapped volume as the working directory (-w /app), creates container from the docker image (etelej/jekyll:latest) and starts the jekyll server as the main docker process (bundle exec jekyll serve defined in Dockerfile).

Method 2: Compose Usage (using docker-compose)

To use docker-compose via the repo's docker-compose.yml, edit the docker-compose.yml file to replace my jekyll site directory with yours (absolute path preferable):

Edit docker-compose.yml from:

    - /home/chief/workspaces/


    - /path/to/your/jekyllsite:/code

Run docker-compose:

docker-compose run --rm jekyll/container

Building your own jekyll image

Build your image

docker build -t YOURNAME/jekyll .

Run your image

cd your-jekyll-app-directory/
docker run --rm -it -p 4000:4000 -v "$PWD":/app -w /app YOURNAME/jekyll

Push your image

docker push YOURNAME/jekyll