Skip to content

Instantly share code, notes, and snippets.

@hhariri
Created August 14, 2016 19:39
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 hhariri/02f0803c5f99430aba93f890294b40d1 to your computer and use it in GitHub Desktop.
Save hhariri/02f0803c5f99430aba93f890294b40d1 to your computer and use it in GitHub Desktop.
Jekyll
# Docker for Jekyll
FROM alpine:latest
MAINTAINER Hadi Hariri <mail@hadihariri.com>
# Install base, Ruby, Headers, Jekyll, Export Path and Clean Up
RUN apk update && apk upgrade && apk add curl wget bash && \
apk add ruby ruby-bundler ruby-dev ruby-irb ruby-rdoc libatomic readline readline-dev \
libxml2 libxml2-dev libxslt libxslt-dev zlib-dev zlib \
libffi-dev build-base git nodejs && \
export PATH="/root/.rbenv/bin:$PATH" && \
rm -rf /var/cache/apk/* && \
# Install Jekyll and required gems
gem install jekyll redcarpet kramdown maruku rdiscount RedCloth liquid pygments.rb \
jekyll-paginate jekyll-sass-converter
@hhariri
Copy link
Author

hhariri commented Aug 14, 2016

Then I have a bash script that runs this:

docker run -v ~/hhariri.github.io:/tmp -p 4000:4000 hhariri/jekyll jekyll serve -s /tmp --host 0.0.0.0 --incremental

@flq
Copy link

flq commented Aug 14, 2016

Awesome, I'll take it for a spin later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment