Created
November 26, 2018 10:07
-
-
Save manojkarthick/66d74ff167bc2cad2e616e6caa795cb1 to your computer and use it in GitHub Desktop.
Creating jekyll docker with preinstalled dependencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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