Dockerfile - move ARG PUID to required place after FROM

This commit is contained in:
Andrew Hurley 2022-08-09 22:24:32 +08:00
parent a4fc6e11d0
commit cbcb261406
1 changed files with 4 additions and 5 deletions

View File

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