Dockerfile - change UID of www-data rather than copy passwd and group

This commit is contained in:
Andrew Hurley 2022-08-09 22:02:26 +08:00
parent f7d9c2142b
commit a4fc6e11d0
1 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,9 @@
ARG VERSION="latest"
ARG PUID="33"
FROM docker.io/library/nextcloud:$VERSION
COPY ncloud-passwd /etc/password
COPY ncloud-group /etc/group
RUN \
if [[ $PUID != "33" ]]; then \
usermod --uid $PUID www-data && \
chown -R www-data /var/www/ \
fi