Skip to content

Instantly share code, notes, and snippets.

@ThabetAmer
Created January 26, 2020 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThabetAmer/b238ac9b060b5fb4872a1fab41068db5 to your computer and use it in GitHub Desktop.
Save ThabetAmer/b238ac9b060b5fb4872a1fab41068db5 to your computer and use it in GitHub Desktop.
Jekyll serve via Docker
# installs gems then serves web on http://0.0.0.0:4000
#
## you may want to exclude vendor/bundle in _config.xml
#
## For Github pages, refer to https://pages.github.com/versions/ to find supported Jekyll version
## as in your Gemfile.
#
export JEKYLL_VERSION=3.8.5
docker run --rm -it \
-v "$(pwd):/srv/jekyll" \
-v "$(pwd)/vendor/bundle:/usr/local/bundle" \
-p4000:4000 \
jekyll/jekyll:$JEKYLL_VERSION \
bundle install && bundle exec jekyll serve --host 0.0.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment