feat(docker): allow setting user and group id via env
This commit is contained in:
parent
09cb4adc6f
commit
e299d46b3e
2 changed files with 5 additions and 3 deletions
|
@ -8,7 +8,9 @@ LABEL org.opencontainers.image.authors="Gareth Flowers" \
|
|||
org.opencontainers.image.vendor="garethflowers"
|
||||
|
||||
ENV FTP_USER=foo \
|
||||
FTP_PASS=bar
|
||||
FTP_PASS=bar \
|
||||
GID=1000 \
|
||||
UID=1000
|
||||
|
||||
RUN apk add --no-cache --update \
|
||||
vsftpd==3.0.3-r6
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
addgroup \
|
||||
-g 1000 \
|
||||
-g $GID \
|
||||
-S \
|
||||
$FTP_USER
|
||||
|
||||
|
@ -10,7 +10,7 @@ adduser \
|
|||
-G $FTP_USER \
|
||||
-h /home/$FTP_USER \
|
||||
-s /bin/false \
|
||||
-u 1000 \
|
||||
-u $UID \
|
||||
$FTP_USER
|
||||
|
||||
mkdir -p /home/$FTP_USER
|
||||
|
|
Loading…
Reference in a new issue