docker: make container user UID and GID configurable via build ARGs - fixes #9839

This commit is contained in:
Vaibhav Mashal
2026-09-08 17:09:05 +01:00
committed by GitHub
parent 9ac29e3b35
commit 2c4bc66e45
+4 -1
View File
@@ -35,6 +35,9 @@ RUN echo "**** Print Version Binary ****" && \
# Begin final image # Begin final image
FROM alpine:latest FROM alpine:latest
ARG RCLONE_UID=1009
ARG RCLONE_GID=1009
RUN echo "**** Install Dependencies ****" && \ RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \ apk add --no-cache \
ca-certificates \ ca-certificates \
@@ -45,7 +48,7 @@ RUN echo "**** Install Dependencies ****" && \
COPY --from=builder /go/src/github.com/rclone/rclone/rclone /usr/local/bin/ COPY --from=builder /go/src/github.com/rclone/rclone/rclone /usr/local/bin/
RUN addgroup -g 1009 rclone && adduser -u 1009 -Ds /bin/sh -G rclone rclone RUN addgroup -g "${RCLONE_GID}" rclone && adduser -u "${RCLONE_UID}" -Ds /bin/sh -G rclone rclone
ENTRYPOINT [ "rclone" ] ENTRYPOINT [ "rclone" ]