From 86af71f43bbeb17693b7228fca8d501c104be456 Mon Sep 17 00:00:00 2001 From: vincent Date: Sun, 4 Dec 2022 09:43:07 +0100 Subject: [PATCH] feat: manage long UID/GUID --- Dockerfile | 2 +- rsync.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index cc274f2..c37fa35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine +FROM alpine:latest RUN apk add --update-cache \ rsync \ diff --git a/rsync.sh b/rsync.sh index 20a367b..a91b5d0 100755 --- a/rsync.sh +++ b/rsync.sh @@ -11,7 +11,8 @@ echo "Preparation steps started." if [ "$RSYNC_UID" != "" ] && [ "$RSYNC_GID" != "" ]; then # UID and GID provided, create user echo "UID and GID provided: $RSYNC_UID and $RSYNC_GID. Creating the user" - adduser -D -u $RSYNC_UID -g $RSYNC_GID rsyncuser + echo "rsyncuser:x:$RSYNC_UID:$RSYNC_GID::/home/rsyncuser:/bin/sh" >> /etc/passwd + echo "users:x:$RSYNC_GID:rsyncuser" >> /etc/group RSYNC_USER=rsyncuser else # UID and GID not provided