aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Scholten2026-08-30 13:11:39 +1000
committerSam Scholten2026-08-30 13:11:39 +1000
commitf9b68825092d6c1eed18a77340eb2238d9dbef40 (patch)
treec5bfafd13518b3eb2bd6e70e58379ac416c3033f
parent2eb104660d4258e90916b75bd6237f5e1603cef0 (diff)
downloadfluxrec-f9b68825092d6c1eed18a77340eb2238d9dbef40.tar.gz
fluxrec-f9b68825092d6c1eed18a77340eb2238d9dbef40.zip
Containerfile: run as uid 1000 to match bind-mount owner
-rw-r--r--Containerfile4
1 files changed, 3 insertions, 1 deletions
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