Docker image for building and serving Jekyll static sites.
183
Docker image for building and serving Jekyll static sites.
All commands are run from your project directory, mounted into the container as /web.
$ docker container run --rm -it \
--user $(id --user):$(id --group) \
--volume .:/web \
bletvaska/jekyll make <target>
To see all the available targets, type:
$ docker container run --rm -it \
--user $(id --user):$(id --group) \
--volume .:/web \
bletvaska/jekyll make help
Creates a new Jekyll site scaffold in the current directory:
$ docker container run --rm -it \
--user $(id --user):$(id --group) \
--volume .:/web \
bletvaska/jekyll make new
Installs all gems defined in Gemfile into vendor/bundle/:
$ docker container run --rm -it \
--user $(id --user):$(id --group) \
--volume .:/web \
bletvaska/jekyll make install
Generates the static site into _site/:
$ docker container run --rm -it \
--user $(id --user):$(id --group) \
--volume .:/web \
bletvaska/jekyll make build
Builds and serves the site locally at http://localhost:5000 with live reload:
$ docker container run --rm -it \
--user $(id --user):$(id --group) \
--volume .:/web \
--publish 5000:5000 \
bletvaska/jekyll make serve
To make things easier, you can create following alias:
$ alias jekyll="docker container run --rm -it \
--user $(id --user):$(id --group) \
--volume .:/web \
--publish 5000:5000 \
bletvaska/jekyll make"
Then you can simply run on your system command jekyll <target>. To see all the available targets, simply type:
$ jekyll help
Content type
Image
Digest
sha256:eb33a2009…
Size
105.6 MB
Last updated
6 months ago
docker pull bletvaska/jekyll