diff --git a/Dockerfile b/Dockerfile index 62c0cea..250d082 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,9 @@ -FROM ghcr.io/hugomods/hugo:0.157.0 AS build +# syntax=docker/dockerfile:1 +# Pin the build stage to the native build platform so Hugo runs once (never +# under QEMU emulation). Hugo output is static HTML — identical across arches — +# so there's no reason to run it per target arch. The runtime stage below stays +# on TARGETPLATFORM, so multi-arch (amd64 + arm64) runtime images are preserved. +FROM --platform=$BUILDPLATFORM ghcr.io/hugomods/hugo:0.157.0 AS build WORKDIR /tmp/hugo COPY . . RUN hugo --gc --minify