mirror of
https://github.com/bitnami/containers.git
synced 2026-03-05 16:17:21 +08:00
specify nginx launch command in Dockerfile
Removes `nami start` as the launch command.
This commit is contained in:
@@ -25,4 +25,4 @@ EXPOSE 80 443
|
||||
|
||||
ENTRYPOINT ["/app-entrypoint.sh"]
|
||||
|
||||
CMD ["nami", "start", "--foreground", "nginx"]
|
||||
CMD ["/opt/bitnami/nginx/sbin/nginx"]
|
||||
|
||||
@@ -5,10 +5,15 @@
|
||||
print_welcome_page
|
||||
check_for_updates &
|
||||
|
||||
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/init.sh" ]]; then
|
||||
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$(basename $1)" == "nginx" ]] || [[ "$1" == "/init.sh" ]]; then
|
||||
nami_initialize nginx
|
||||
|
||||
# ensure nginx is not daemonized
|
||||
if [[ "$(basename $1)" == "nginx" ]]; then
|
||||
set -- "$@" -g 'daemon off;'
|
||||
fi
|
||||
|
||||
chown -R :daemon /bitnami/nginx || true
|
||||
info "Starting nginx..."
|
||||
fi
|
||||
|
||||
exec tini -- "$@"
|
||||
|
||||
Reference in New Issue
Block a user