Skip to content

Instantly share code, notes, and snippets.

@edelabar
Created November 2, 2023 14:35
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save edelabar/ab8eb36c59457afb047f8e435b1f3927 to your computer and use it in GitHub Desktop.
DockerFile for Jekyll 2.6.3 with gems for ericdelabar.com
FROM ruby:2.6.3
RUN apt-get update
RUN apt-get install -y --no-install-recommends python-pip
RUN pip install Pygments
RUN gem install jekyll:2.5.3 rdiscount kramdown titlecase
ENV JEKYLL_HOME /data
RUN addgroup jekyll --gid 500 && mkdir -p $JEKYLL_HOME && \
adduser --uid 500 --ingroup jekyll --home $JEKYLL_HOME --disabled-password --gecos '' jekyll && \
chown -R jekyll:jekyll /data
USER jekyll
VOLUME /data
EXPOSE 4000
WORKDIR /data
@edelabar
Copy link
Author

edelabar commented Nov 2, 2023

To setup:

  1. Install Docker
  2. Put this file in your Jekyll 2.6.3 site's directory.
  3. Run docker build -t blog . to build the image.

To generate your site:

  1. From the site's directory, run docker run --volume="$PWD:/data" -it blog jekyll build
  2. No step 2.

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