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