Need help with docker-github-pages?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

162 Stars 49 Forks MIT License 223 Commits 18 Opened issues


:octocat: :whale: Alpine Docker Image for GitHub Pages and Jekyll powered sites

Services available


Need anything else?

Contributors list

Alpine Docker GitHub Pages Image Layers

Alpine Docker image for running GitHub Pages / Jekyll projects. Only 70 MB.

Demo using GitHub Page on Docker

Supported tags and respective

What is GitHub Pages

GitHub Pages are public webpages hosted and published directly through your GitHub repository.

How to use this image

This image makes it easy to run your GitHub Pages page locally while developing – refreshing changes automatically as you make them. All you need to do is to mount your page in a volume under

like this:
$ docker run -it --rm -v "$PWD":/usr/src/app -p "4000:4000" starefossen/github-pages

Your Jekyll page will be available on


Remember to add all the gems to your

file in order to get all the different things to work correctly:
repository: your/repo


  • jekyll-github-metadata
  • jekyll-mentions
  • jekyll-redirect-from
  • jekyll-sitemap
  • jemoji

Also, in order for the

{{ site.github }}
metadata variables to be populated you need to set the
environment variable with your GitHub token.
$ docker run \
-t --rm \
-v "$PWD":/usr/src/app \
-e JEKYLL_GITHUB_TOKEN=my-github-token \
-p "4000:4000" starefossen/github-pages

Docker compose

If you want to use Docker Compose instead, you can move a lot of the options into a

at the root of your project:
version: '3'
    image: starefossen/github-pages
      - "4000:4000"
      - ./:/usr/src/app
    tty: true

Then start the container with

docker-compose up

Slow filesystem issues in Docker for Mac

When running this image in Docker for Mac you might experience slow page generation times. This is due to some limitations in the Docker for Mac filesystem integration. Changing the volume configuration to

-v "$PWD":/usr/src/app:delegated
will massively improve the page generation time, at the cost of delaying the generated files showing up in your host system slightly. In case you don't even need the generated pages on your host system, you can also exclude the
folder completely from being mounted by adding a container-only volume:
-v site:/usr/src/app/_site

Image Variants


images come in two flavors, each designed for a specific use case.


This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.


This image makes building derivative images easier. For most use cases, creating a

in the base of your project directory with the line
will be enough to create a stand-alone image for your project.


This Docker image is licensed under the MIT License.

Software contained in this image is licensed under the following:

Supported Docker versions

This image is officially supported on Docker version v17.

Support for older versions (down to v1.0) is provided on a best-effort basis.

User Feedback



If you have any problems with or questions about this image, please contact us through a GitHub issue.


You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.

Before you start to code, we recommend discussing your plans through a GitHub issue, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.