# # Create a Jekyll container form a Ruby Apline image

# # At a minimum, use Ruby 2.5 or Later

# FROM ruby:2.7-alpine3.15

# # Add Jekyll dependencies to Alpine
# RUN apk update
# RUN apk add --no-cache build-base gcc cmake git


# # Upate the Ruby bundler and install Jekyll
# RUN gem update bundler
# RUN gem install bundler jekyll

FROM ruby:2.3 as build

ENV JEKYLL_ENV: production
WORKDIR /usr/src/app

COPY . /usr/src/app

RUN bundle install && \
    bundle exec jekyll build -d public

FROM nginx:1.13-alpine

COPY --from=build /usr/src/app/public/ /usr/share/nginx/html/