2023-11-11 14:41:20 +00:00
|
|
|
FROM ruby:3.2-alpine AS builder
|
2023-08-08 21:11:00 +00:00
|
|
|
LABEL stage=distrust-co-builder
|
2023-11-11 14:41:20 +00:00
|
|
|
RUN apk update && apk add g++ make
|
2023-08-08 21:11:00 +00:00
|
|
|
RUN mkdir -p /home
|
|
|
|
COPY Gemfile /home
|
|
|
|
COPY Gemfile.lock /home
|
2023-11-11 14:41:20 +00:00
|
|
|
# copying _vendor is not needed at the moment
|
|
|
|
# COPY _vendor /home/_vendor
|
2023-08-08 21:11:00 +00:00
|
|
|
WORKDIR /home
|
|
|
|
RUN bundle install
|
|
|
|
COPY . /home
|
2023-11-10 16:51:27 +00:00
|
|
|
RUN jekyll build
|
2023-08-08 21:11:00 +00:00
|
|
|
|
2023-11-11 14:41:20 +00:00
|
|
|
FROM debian:bookworm AS mime-types
|
|
|
|
RUN apt-get update && apt-get install -y media-types
|
|
|
|
|
|
|
|
RUN echo 'types {' > /tmp/mime.types
|
|
|
|
RUN sed -e '/^$/d' -e 's/$/;/' /etc/mime.types >> /tmp/mime.types
|
|
|
|
RUN echo '}' >> /tmp/mime.types
|
|
|
|
|
2023-11-10 16:51:27 +00:00
|
|
|
FROM nginx:1.25
|
2023-11-11 14:41:20 +00:00
|
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
|
|
# extend the recognized MIME types
|
|
|
|
# this allows nginx to detect and compress font files
|
|
|
|
COPY --from=mime-types /tmp/mime.types /etc/nginx/mime.types
|
2023-08-08 21:11:00 +00:00
|
|
|
COPY --from=builder /home/_site /usr/share/nginx/html
|