Sign inSign up

jclagache/github-pages

By jclagache

•Updated almost 11 years ago

Simple Docker Container for Jekyll work closely as GitHub pages.

Image
2

1.2K

jclagache/github-pages repository overview

⁠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⁠.

Tag summary

Content type

Image

Digest

sha256:2def3ebb7…

Size

359.8 MB

Last updated

almost 11 years ago

docker pull jclagache/github-pages