FROM alpine:latest AS build RUN apk add --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ zola yarn COPY . /src WORKDIR /src RUN yarn install RUN zola build FROM caddy:alpine AS serve COPY --from=build /src/public/ /srv/ COPY Caddyfile /etc/caddy/Caddyfile RUN caddy fmt --overwrite /etc/caddy/Caddyfile