FROM ruby:3.0-alpine

RUN apk add --no-cache \
        build-base \
        python3 \
        py3-pip

RUN pip3 install awscli
RUN rm -rf /var/cache/apk/*

RUN bundle config --global frozen 1

WORKDIR /app

COPY Gemfile.lock .
COPY Gemfile .
RUN bundle install

COPY scripts/mime.types /etc/mime.types
COPY . .

ENTRYPOINT ["jekyll"]