- base it on the custom git.brds.ca/d-b.ca/hugo-builder (as the gohugo container doesn't really work for this).
15 lines
339 B
Docker
15 lines
339 B
Docker
# Package versions
|
|
ARG HUGO_VERSION="latest"
|
|
ARG CADDY_VERSION="2.10.0"
|
|
|
|
# Stage 1: Build
|
|
FROM git.brds.ca/d-b.ca/hugo-builder:${HUGO_VERSION} AS builder
|
|
WORKDIR /project
|
|
COPY . .
|
|
RUN hugo --minify build
|
|
|
|
# Stage 2: Package
|
|
FROM docker.io/caddy:${CADDY_VERSION}
|
|
COPY Caddyfile /etc/caddy/Caddyfile
|
|
COPY --from=builder /project/public /srv
|