Skip to content

Commit

Permalink
disable default www-data user
Browse files Browse the repository at this point in the history
  • Loading branch information
haipham22 committed Jan 7, 2024
1 parent 528c454 commit 9e05080
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
RUN chown -R www-data.www-data /app /run /var/lib/nginx /var/log/nginx

# Switch to use a non-root user from here on
USER www-data
# USER www-data

# Add application
COPY --chown=www-data src/ /app/
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ If you need [Composer](https://getcomposer.org/) in your project, here's an easy
FROM haipham22/nginx-php-fpm:latest

# Install composer via install-php-extensions
RUN install-php-extensions composer
RUN install-php-extensions @composer

# Run composer install to install the dependencies
RUN composer install --optimize-autoloader --no-interaction --no-progress
Expand All @@ -76,8 +76,6 @@ RUN composer install --optimize-autoloader --no-interaction --no-progress
```Dockerfile
FROM haipham22/nginx-php-fpm:8.2-fpm-alpine

USER root

RUN echo "[Date]" >> "$PHP_INI_DIR/php.ini"
RUN echo "memory_limit = 128M;" >> "$PHP_INI_DIR/php.ini"

Expand Down

0 comments on commit 9e05080

Please sign in to comment.