File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM jekyll/jekyll:4.4.1 AS builder
1+ FROM ruby:3.2.11 AS builder
22
33LABEL org.opencontainers.image.source="https://github.com/TeamNewPipe/website"
44
5- COPY Gemfile /srv/jekyll
6- RUN bundle install
5+ # make debugging easier
6+ SHELL [ "/bin/bash" , "-xc" ]
77
8- COPY Gemfile.lock /srv/jekyll
9- RUN bash -xc "chown jekyll: Gemfile.lock && \
10- cd /srv/jekyll && \
11- gem install bundler && \
12- bundle update"
8+ RUN mkdir /project/
9+ COPY Gemfile Gemfile.lock /project/
1310
14- WORKDIR /srv/jekyll
11+ WORKDIR /project/
12+
13+ # run bundle lock to rewrite the Lockfile and therefore ignore version differences of bundler and the lockfile without updating dependencies
14+ RUN bundle lock && \
15+ bundle install
1516
1617# define args and env vars before copying content to speed up subsequent builds, as they hardly ever change
1718ARG ISSO_ADDRESS
@@ -23,14 +24,12 @@ ENV JEKYLL_ENV=production
2324ENV TZ=Europe/Berlin
2425
2526# copy data
26- COPY . /srv/jekyll/
27-
28- RUN bash -xc "chown -R jekyll: /srv/jekyll && \
29- bundle update jekyll && \
30- cd /srv/jekyll && \
31- jekyll clean && \
32- jekyll build && \
33- mv _site/ /data"
27+ COPY . /project/
28+
29+ RUN bundle exec jekyll clean && \
30+ bundle exec jekyll build && \
31+ mv _site/ /data
32+
3433
3534FROM nginx:alpine
3635
You can’t perform that action at this time.
0 commit comments