specify nginx launch command in Dockerfile

Removes `nami start` as the launch command.
This commit is contained in:
Sameer Naik
2017-03-08 15:26:43 +05:30
parent 333663518d
commit 05cf8fd0aa
2 changed files with 8 additions and 3 deletions

View File

@@ -25,4 +25,4 @@ EXPOSE 80 443
ENTRYPOINT ["/app-entrypoint.sh"]
CMD ["nami", "start", "--foreground", "nginx"]
CMD ["/opt/bitnami/nginx/sbin/nginx"]

View File

@@ -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 -- "$@"