Sign inSign up

sievelau/jekyll

By sievelau

•Updated almost 3 years ago
Archived

Containerized jekyll.

Image
0

474

sievelau/jekyll repository overview

⁠Usage

Mount your jekyll site folder (the one containing Gemfile) into /site and (optionally) mount a cache directory to /usr/local/bundle for caching gems, and pass your bundle command to the container:

docker run --rm -v $(pwd):/site -v $(pwd)/.cache:/usr/local/bundle sievelau/jekyll:cli bundle exec jekyll build

For starting a live server for preview, use the server tag:

docker run --rm -p 4000:4000 -v $(pwd):/site -v $(pwd)/.cache:/usr/local/bundle sievelau/jekyll:server

⁠How it works

The image works on /site. The container will search for the Gemfile in the /site folder and:

  1. if it finds one, it will run bundle install to prepare the dependencies.
  2. if there is none, it will run gem install jekyll to make jekyll command available (so you can init a new jekyll site).

After that, the cli tag variant will run the command you gave while the server variant will start a jekyll live server on port 4000.

Basically, the two tags are the same, except that the server tag will execute the command to start the jekyll local server by default, while the cli will not do anything meaningful.

Tag summary

Content type

Image

Digest

sha256:9ee01ac8a…

Size

217.7 MB

Last updated

almost 3 years ago

docker pull sievelau/jekyll:fat