try to run entrypoint as non root user

This commit is contained in:
Jean-Christian Denis 2024-12-13 18:05:41 +01:00
parent da05bcf92b
commit 14e3db80b5
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951
2 changed files with 7 additions and 4 deletions

View file

@ -154,7 +154,14 @@ WORKDIR /var/www/dotclear/app
# Add container starting script
ADD docker-entrypoint.sh /entrypoint.sh
USER www
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
USER root
# FPM must start first in daemon mode
# Then nginx in no daemon mode
SHELL ["/bin/sh", "-c"]
CMD php-fpm84 -D && nginx
# Docker container healthcheck
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:80/fpm-ping || exit 1

View file

@ -95,8 +95,4 @@ echo >&2 "│ ◦ PHP $(php84 -r "echo PHP_VERSION;")"
echo >&2 "│ ◦ Dotclear ${VERSION_INSTALLED}"
echo >&2 '└──'
# Start web server
php-fpm84 -D # FPM must start first in daemon mode
nginx # Then nginx in no daemon mode
exec "$@"