Created
December 1, 2020 17:56
-
-
Save exegeteio/94031d431d735acd6ccddb3c2ab223e3 to your computer and use it in GitHub Desktop.
Jekyll Dockerfile with intermediate containers, deploying with nginx.
This file contains 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.6 AS jekyll | |
WORKDIR /usr/src/app | |
COPY Gemfile Gemfile.lock /usr/src/app/ | |
RUN bundle install --quiet -j 4 | |
COPY . /usr/src/app/ | |
EXPOSE 3000 | |
CMD jekyll server -P 3000 -H 0.0.0.0 -w --force_polling --incremental | |
FROM jekyll AS website | |
ENV JEKYLL_ENV=production | |
RUN jekyll build | |
FROM nginx AS final | |
COPY _nginx/default.conf /etc/nginx/conf.d/default.conf | |
WORKDIR /usr/share/www | |
COPY --from=website /usr/src/app/docs /usr/share/www/ | |
EXPOSE 5000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment