try to run entrypoint as non root user
This commit is contained in:
parent
da05bcf92b
commit
14e3db80b5
2 changed files with 7 additions and 4 deletions
|
@ -154,7 +154,14 @@ WORKDIR /var/www/dotclear/app
|
||||||
|
|
||||||
# Add container starting script
|
# Add container starting script
|
||||||
ADD docker-entrypoint.sh /entrypoint.sh
|
ADD docker-entrypoint.sh /entrypoint.sh
|
||||||
|
USER www
|
||||||
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
|
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
|
# Docker container healthcheck
|
||||||
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:80/fpm-ping || exit 1
|
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:80/fpm-ping || exit 1
|
|
@ -95,8 +95,4 @@ echo >&2 "│ ◦ PHP $(php84 -r "echo PHP_VERSION;")"
|
||||||
echo >&2 "│ ◦ Dotclear ${VERSION_INSTALLED}"
|
echo >&2 "│ ◦ Dotclear ${VERSION_INSTALLED}"
|
||||||
echo >&2 '└──'
|
echo >&2 '└──'
|
||||||
|
|
||||||
# Start web server
|
|
||||||
php-fpm84 -D # FPM must start first in daemon mode
|
|
||||||
nginx # Then nginx in no daemon mode
|
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
Loading…
Reference in a new issue