site/Dockerfile

22 lines
372 B
Docker
Raw Normal View History

2022-03-29 16:01:16 +02:00
FROM alpine:3.15.3 AS builder
RUN apk update && \
apk add --no-cache \
hugo
WORKDIR /app
COPY . ./
# Build the site
RUN hugo
FROM nginx:1.21.6-alpine
COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
COPY nginx/*.conf.template /etc/nginx/templates/
COPY --from=builder /app/public /usr/share/nginx/html