split Docker build into phases
- as per https://github.com/gohugoio/hugo/issues/12991
This commit is contained in:
parent
ef6b699072
commit
0622c2a858
@ -3,10 +3,11 @@ ARG HUGO_VERSION="v0.147.1"
|
||||
ARG CADDY_VERSION="2.10.0"
|
||||
|
||||
# Stage 1: Build
|
||||
FROM ghcr.io/gohugoio/hugo:${HUGO_VERSION} AS builder
|
||||
WORKDIR /project
|
||||
FROM ghcr.io/gohugoio/hugo:${HUGO_VERSION} AS source
|
||||
COPY . .
|
||||
RUN hugo build
|
||||
|
||||
FROM source AS builder
|
||||
RUN /entrypoint.sh build
|
||||
|
||||
# Stage 2: Package
|
||||
FROM docker.io/caddy:${CADDY_VERSION}
|
||||
|
Loading…
x
Reference in New Issue
Block a user