feat: manage long UID/GUID
This commit is contained in:
parent
debe5bccbf
commit
86af71f43b
@ -1,4 +1,4 @@
|
||||
FROM alpine
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk add --update-cache \
|
||||
rsync \
|
||||
|
3
rsync.sh
3
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
|
||||
|
Reference in New Issue
Block a user