Run container as unprivileged www-data user and simplify entrypoint

- Remove root-only FPM user configuration from entrypoint.sh (moved to Dockerfile build time)
- Remove Redis session configuration from entrypoint.sh (handled by Symfony services)
- Remove cache directory permission adjustments (unnecessary with proper ownership)
- Set file ownership to www-data:www-data at build time using COPY --chown
- Create required directories and set ownership in single RUN layer
- Switch to www-data USER before CMD
- Remove PHP_FPM_USER, PHP_FPM_GROUP, SESSION_LIFETIME environment variables
- Add docker/ directory to .dockerignore
This commit is contained in:
julielenaerts committed 2026-10-26 11:02:05 +01:00
1 parent b1eb46f902
commit 0e6ec94ae4
3 files changed
+27 -39

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
docker/
###> symfony/framework-bundle ###
/.env.local
/.env.local.php