Skip to content

Commit

Permalink
update Docker build stage
Browse files Browse the repository at this point in the history
and replace outdated jekyll/jekyll base image which does not provide support for ruby3
  • Loading branch information
peterstadler committed Jul 23, 2024
1 parent 0ff03b9 commit 55951cc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
FROM jekyll/jekyll:builder as builder
FROM ruby:3 AS builder

ENV WORK_DIR=/var/jekyllbuilder
ARG BUILD_SCRIPT=build

# since WORKDIR will not honour the USER directive
# we need to create the directory and set permissions in advance
RUN mkdir -p ${WORK_DIR} && \
chown -R jekyll:jekyll ${WORK_DIR}

# set default jekyll user for building
USER jekyll:jekyll
WORKDIR ${WORK_DIR}
COPY --chown=jekyll . .
COPY . .

# install dependencies
RUN apt-get update \
&& apt-get dist-upgrade -y \
&& apt-get install -y --no-install-recommends nodejs npm \
# clean up apt cache
&& rm -rf /var/lib/apt/lists/*

# build local
RUN npm i && \
Expand Down

0 comments on commit 55951cc

Please sign in to comment.