[mirror] Scalable static site server for Git forges (like GitHub Pages)

Docker: clean Go cache after building executables.

This is an attempt to stop OOMing Codeberg's Forgejo Actions runners,
which count disk and RAM against the same quota.

Changed files
+6 -3
+6 -3
Dockerfile
··· 8 8 WORKDIR /build 9 9 RUN git clone https://github.com/ochinchina/supervisord . && \ 10 10 git checkout 16cb640325b3a4962b2ba17d68fb5c2b1e1b6b3c 11 - RUN GOBIN=/usr/bin go install -ldflags "-s -w" 11 + RUN GOBIN=/usr/bin go install -ldflags "-s -w" && \ 12 + go clean -cache -modcache 12 13 13 14 # Build Caddy with S3 storage backend. 14 15 FROM docker.io/library/caddy:2.10.2-builder@sha256:53f91ad7c5f1ab9a607953199b7c1e10920c570ae002aef913d68ed7464fb19f AS caddy-builder 15 16 RUN xcaddy build ${CADDY_VERSION} \ 16 - --with=github.com/ss098/certmagic-s3@v0.0.0-20250922022452-8af482af5f39 17 + --with=github.com/ss098/certmagic-s3@v0.0.0-20250922022452-8af482af5f39 && \ 18 + go clean -cache -modcache 17 19 18 20 # Build git-pages. 19 21 FROM docker.io/library/golang:1.25-alpine@sha256:aee43c3ccbf24fdffb7295693b6e33b21e01baec1b2a55acc351fde345e9ec34 AS git-pages-builder ··· 23 25 RUN go mod download 24 26 COPY *.go ./ 25 27 COPY src/ ./src/ 26 - RUN go build -ldflags "-s -w" -o git-pages . 28 + RUN go build -ldflags "-s -w" -o git-pages . && \ 29 + go clean -cache -modcache 27 30 28 31 # Compose git-pages and Caddy. 29 32 FROM docker.io/library/busybox:1.37.0-musl@sha256:ef13e7482851632be3faf5bd1d28d4727c0810901d564b35416f309975a12a30