Skip to content

Instantly share code, notes, and snippets.

@manojkarthick
Created November 26, 2018 10:07
Show Gist options
  • Select an option

  • Save manojkarthick/66d74ff167bc2cad2e616e6caa795cb1 to your computer and use it in GitHub Desktop.

Select an option

Save manojkarthick/66d74ff167bc2cad2e616e6caa795cb1 to your computer and use it in GitHub Desktop.
Creating jekyll docker with preinstalled dependencies
FROM ruby:2.5-alpine
# Install C dependencies and Jekyll
RUN apk add --no-cache build-base gcc bash cmake
RUN gem install jekyll
# Building with Gems installed to eliminate bundle installation every time
WORKDIR /site
COPY Gemfile .
RUN bundle install
# Expose port 4000 which is jekyll in-built server's port
EXPOSE 4000
# Serve jekyll application at port 4000
CMD [ "jekyll", "serve", "--force_polling", "-P", "4000" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment