Jekyll Docker Images
Jekyll Docker is a full featured Alpine based Docker image that provides an isolated Jekyll instance with the latest version of Jekyll and a bunch of nice stuff to make your life easier when working with Jekyll in both production and development.
jekyll/jekyll:pages tag tries to be as close to Github pages as possible, without changing much, there might be some differences and if there are please do file a ticket and they will be corrected if possible... remember not all things can be corrected because sometimes it will just diverge way too much.
If you do not provide a command then it will default to
On Native Docker
# Switch to 80:80 or 4000:80 if you wish to use only Nginx with `jekyll build` docker run --rm --label=jekyll --volume=$(pwd):/srv/jekyll \ -it -p 127.0.0.1:4000:4000 jekyll/jekyll
On Docker-Machine / Docker-Toolbox
# Switch to 80:80 or 4000:80 if you wish to use only Nginx with `jekyll build` docker run --rm --label=jekyll --volume=$(pwd):/srv/jekyll \ -it -p $(docker-machine ip `docker-machine active`):4000:4000 \ jekyll/jekyll
If all else fails remove the IP from the
-p and just do
4000:4000 and file a ticket and we will help you figure out if this might be a bug in your networking setup or if this might be a bug with us or an upstream bug. Do not file a bug if you need to purposefully enable 4000:4000 because you want access from a public IP
If you are on Windows or OS X using Docker-Machine or Boot2Docker you will need to
--force_polling or send the environment variable
POLLING=true because there is no built-in support for NTFS/HFS notify events to inotify and the verse, you'll be on two different file systems so only the basic API's are implemented. This also applies to docker-machine which either uses boot2docker or is like-it.
Gemfiles and Gem Installation
If you provide a
Gemfile and that
Gemfile has a
Git(hub) dependency we can quickly detect with a Regexp we will default to installing with bundler so that we do not break anything that you are trying to accomplish. Otherwise we will do a global install on your behalf (via
gem -g) so all commands work as normal without
bundle. When we install gems we first try to install without any system depedencies assuming you have a few pure Ruby Jekyll gems and then if that fails we will go through and do an
apk instal dependencies for you and try again and if that all fails we will try one last time just to make sure there wasn't an IO error.
Apk (Alpine) dependencies for Gems
If you provide a
.apk file inside of your root we will detect it and install those dependencies inside of the image for you and attempt to be smart about running it all the time, in that we
Gemfile and if
diff says there is a difference we will install and if there is no difference we will not install them unless there is a
bundle error, and if there is then we will try to install common dependencies plus what's inside of your
.apk file before trying to install gems again.
$FORCE_APK_INSTALL- Force install
.apk100% of the time.
$BUNDLE_CACHE- Cache and install to the vendor/bundle folder.
$POLLING- Force polling with
This image includes Nginx and even adjusting and adding some location stuff or basic customizations via a
.nginx folder in your Jekyll root. These do not affect the entire server and only affect the server in Jekyll's context, so you will be able to add locations and other customizations into Jekyll's server directive. Nginx exists to allow you to do advanced stuff but our recommended access is through the default port 4000 right now.
The Github (pages tag) may contain dependencies that we don't directly carry, you should also see https://pages.github.com/versions/ to see what extra dependencies that the pages tag might carry, and if you wish them to be included please file a ticket and we'll consider it.
- jekyll-sass-converter: SASS converter.
- jekyll-coffeescript: CoffeeScript converter.
- pygments.rb: Pygments syntax highlighting in Ruby.
- rdiscount: Discount (For Ruby) Implementation of John Gruber's Markdown.
- html-proofer: Test your rendered HTML files to make sure they're accurate.
- jekyll-redirect-from: Seamlessly specify multiple redirect URLs for your pages and posts.
- jekyll-compose: Streamline your writing in Jekyll with these commands.
- jekyll-sitemap: Silently generate a sitemaps.org compliant sitemap.
- jekyll-feed: Generate an Atom (RSS-like) feed of your Jekyll posts.
- RedCloth: Ruby library for converting Textile into HTML.
- kramdown: Fast, pure-Ruby Markdown-superset converter.
- redcarpet: The safe Markdown parser, reloaded.
- jemoji: GitHub-flavored emoji plugin for Jekyll.
- Maruku: Markdown interpreter written in Ruby.
- jekyll-mentions: @mention support.
If you want to just build Jekyll sites, you can use
builder tag. Additionaly to other tags, it has:
ssh (for sftp),
lftp See the wiki page with examples how to configure CI solutions to use this image
Building Our Images
You can build our images or any specific tag of an image with
bundle exec docker-template jekyll or
bundle exec docker-template jekyll:tag, yes it's that simple to build our images even if it looks complicated it's not.
- Fork the current repo;
opts.ymlholds the version, gems and most everything.
- If you are updating to the latest version of Jekyll, the version tables at the top.
- Build all the tags with
bundle exec docker-template jekyllor tag
- Ensure that your indented changes work as they're supposed to and
- Ship a pull request if you wish to have it reviewed for all users!