FROM docker.io/alpine:latest AS builder # install dependencies WORKDIR /app RUN apk add zola # Copy all local files into the image. COPY . . RUN mkdir -p templates static # Build RUN zola build # Build the runtime image FROM docker.io/nginx:alpine WORKDIR /app COPY --from=builder /app/public /usr/share/nginx/html COPY nginx.conf /etc/nginx/nginx.conf CMD ["nginx", "-g", "daemon off;"]