Th3On3

Th3On3 Website

View on GitHub

  • Projects:

  • Tag cloud:

21 December 2020

How to deploy Jekyll site with docker

by Fernando Manuel Fernandes Rodrigues

Scenario

Assumptions

Objective

Problems

Batch files

Jekyll_build.bat
@echo OFF
docker run --rm -it --volume="/C/PATH/TO/SITE:/srv/jekyll" --volume="/C/PATH/TO/SITE/vendor/bundle:/usr/local/bundle" --env JEKYLL_ENV=production jekyll/jekyll:latest jekyll build
Jekyll_serve.bat
@echo OFF
docker run -d --rm --volume="/C/PATH/TO/SITE:/srv/jekyll" --volume="/C/PATH/TO/SITE/vendor/bundle:/usr/local/bundle" --env JEKYLL_ENV=development -p 4000:4000 jekyll/jekyll:latest jekyll servebuild

Steps

tags: Jekyll - Docker - Github