Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c5ad181

Browse files
authored
Fix non-root user not set by default
1 parent e61702f commit c5ad181

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
2525
# Set default dev php.ini
2626
RUN mv "$PHP_INI_DIR/php.ini-$ENVIRONMENT" "$PHP_INI_DIR/php.ini"
2727

28-
# Setup uID for active user
28+
# Setup uID for www-data user
2929
RUN usermod -u $UID www-data
3030

31+
# Change to www-data user
32+
USER www-data
33+
3134
# Set Working Dir
3235
WORKDIR /srv/app
33-
34-
EXPOSE 9000
35-
36-
CMD ["php-fpm"]

0 commit comments

Comments
 (0)