From f9b68825092d6c1eed18a77340eb2238d9dbef40 Mon Sep 17 00:00:00 2001 From: Sam Scholten Date: Sun, 30 Aug 2026 13:11:39 +1000 Subject: Containerfile: run as uid 1000 to match bind-mount owner --- Containerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Containerfile') diff --git a/Containerfile b/Containerfile index 3f52aef..17ff724 100644 --- a/Containerfile +++ b/Containerfile @@ -17,8 +17,10 @@ COPY . . RUN CGO_ENABLED=0 go build -trimpath -o /out/fluxrec . FROM alpine:3.21 +# uid 1000 = the first local user on a typical host, so a bind-mounted +# /data and files scp'd into it have one owner on both sides. RUN apk add --no-cache tzdata \ - && adduser -D fluxrec \ + && adduser -D -u 1000 fluxrec \ && mkdir -p /data && chown fluxrec:fluxrec /data USER fluxrec COPY --from=build /out/fluxrec /usr/local/bin/fluxrec -- cgit v1.2.3