kcl-digital-humanities-garden/Dockerfile.dev
tobias dfffae35b2
Some checks reported errors
GitHub Pages Deploy / deploy (push) Waiting to run
JS Lint / lint (push) Waiting to run
HTMLProofer / test (2.7) (push) Waiting to run
HTMLProofer / test (3.0) (push) Waiting to run
continuous-integration/drone/push Build encountered an error
Attempt at drone deploy
2024-07-10 10:00:42 +02:00

30 lines
818 B
Docker

FROM ruby:3.0.0 as jekyll
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
&& rm -rf /var/lib/apt/lists/*
# used in the jekyll-server image, which is FROM this image
COPY docker-entrypoint.sh /usr/local/bin/
RUN gem update --system && gem install jekyll && gem cleanup
EXPOSE 4000
WORKDIR /site
ENTRYPOINT [ "jekyll" ]
CMD [ "--help" ]
# build from the image we just built with different metadata
FROM jekyll as jekyll-serve
COPY --from=jekyll /usr/local/bin/docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# on every container start, check if Gemfile exists and warn if it's missing
ENTRYPOINT [ "docker-entrypoint.sh" ]
CMD [ "bundle", "exec", "jekyll", "serve", "--force_polling", "-H", "0.0.0.0", "-P", "4000" ]