prime8dev

prime8dev
git clone https://git.prime8.dev/prime8dev.git
Log | Files | Refs | README | LICENSE

commit 44be6c3100ab8152c1635797b569e5fa2c603d70
parent 58a871ccd1abb6b2692cf8c2d52070c77cde3e52
Author: Damian Myrda <damian@prime8.dev>
Date:   Tue, 20 Oct 2026 22:30:53 +0000

build(docker): install git in runtime image for repo reads

Add git to the alpine stage and trust every directory via
safe.directory '*', since the bare repos are bind-mounted read-only
from a host user with a different uid.

Diffstat:
MDockerfile | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/Dockerfile b/Dockerfile @@ -13,6 +13,14 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o /server ./cmd/server FROM alpine:latest WORKDIR /app +# git reads project READMEs from bare repos bind-mounted read-only from a +# host user with a different uid, so trust every directory. +RUN apk add --no-cache git \ + && git config --system safe.directory '*' + +ENV GIT_REPOS_DIR=/srv/git/repos +ENV GIT_WEB_BASE=https://git.prime8.dev + COPY --from=build /server ./server COPY --from=build /app/static ./static COPY --from=build /app/content ./content