Skip to content

Commit 276da61

Browse files
committed
fix: resolve permission
1 parent ab8ac81 commit 276da61

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

fpm-alpine/8.3/dockerfile

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,8 @@ RUN apk del --no-cache \
7676
libtool && \
7777
rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
7878

79-
# Set the working directory
80-
WORKDIR /var/www
81-
82-
# Create a non-root user and group
83-
RUN getent group ${GROUP} || addgroup -g 1000 ${GROUP}
84-
RUN id -u ${USER} || adduser --shell /sbin/nologin --disabled-password --no-create-home --uid 1000 --ingroup ${GROUP} ${USER}
85-
86-
# Grant write permissions to the non-root user and group
87-
RUN chown -R ${USER}:${GROUP} /var/www
88-
8979
# Expose PHP-FPM port
9080
EXPOSE 9000
9181

92-
# Switch to non-root user
93-
USER ${USER}
94-
9582
# Start PHP-FPM
96-
CMD ["php-fpm"]
83+
CMD ["php-fpm"]

0 commit comments

Comments
 (0)