docker-github-pages

docker-github-pages

Simple Docker Image for Jekyll work closely as GitHub pages.

docker-github-pages

Simple Docker Image for Jekyll works closely as GitHub pages. Develop and build locally your Jekyll website before committing to GitHub without the pain to install the ruby/Jekyll stack.

Usage

Assuming /my-awesome-site is your local directory containing the Jekyll website :

$ docker pull jclagache/github-pages
$ docker run --rm -p 4000:4000 -v /my-awesome-site:/src jclagache/github-pages serve

will serve the site and watch for changes automatically at http://localhost:4000

Boot2docker

Since boot2docker now includes the VirtualBox Guest Additions built in, you can use the VirtualBox folder sharing. Some share names will be automatically mounted but you can mount your own. In the host :

$ vboxmanage sharedfolder add "boot2docker-vm" --name my-awesome-site-share --hostpath /my-awesome-site --automount

In the guest, mount it wherever you want :

$ sudo mkdir /my-awesome-site-on-guest
$ sudo mount -t vboxsf -o uid=1000,gid=50 my-awesome-site-share /my-awesome-site-on-guest

Download the image and run the container :

$ docker pull jclagache/github-pages
$ docker run --rm -p 4000:4000 -v /my-awesome-site-on-guest:/src jclagache/github-pages serve --force_polling

Note that you must pass the --force_polling option to watch for changes automatically due to Jekyll (Listen) vboxfs issue.