FROM alpine:latest AS builder WORKDIR /usr/src/app # Install Hugo RUN apk add --no-cache hugo # Copy site files for building COPY . ./ # Generate the site RUN hugo --minify FROM nginx:alpine COPY nginx.conf /etc/nginx/nginx.conf COPY --from=builder /usr/src/app/public /usr/share/nginx/html