Various forks and patches.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 lines
822 B

FROM ruby:3-alpine
ARG JEKYLL_VERSION="4.3.2"
COPY patches /patches
WORKDIR /srv/jekyll
RUN apk add --no-cache --virtual=.build-dependencies g++ git make musl-dev patch \
&& echo -e 'source "https://rubygems.org"' > /Gemfile \
&& printf 'gem "jekyll", "%s"' "$JEKYLL_VERSION" >> /Gemfile \
&& cd / \
&& bundle --jobs=8 --without=development --without=test \
&& cd /usr/local/bundle/gems/jekyll-$JEKYLL_VERSION/ \
&& if [ -f /patches/${JEKYLL_VERSION}.patch ]; \
then \
PATCH=$JEKYLL_VERSION; \
else \
PATCH=master; \
fi \
&& patch -s -p0 < "/patches/${PATCH}.patch" \
&& rm -rf /patches /Gemfile \
&& apk del .build-dependencies
EXPOSE 4000
VOLUME ["/srv/jekyll"]
CMD ["sh", "-c", "bundle install && jekyll serve -I --host 0.0.0.0"]