diff --git a/entrypoint.sh b/entrypoint.sh index 57dc81c..8523655 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -24,7 +24,7 @@ NGINX_CONF_FILE="/etc/nginx/conf.d/default.conf" INDEX_HTML_FILE="/usr/share/nginx/html/index.html"; # Change default NGINX listen port if NGINX_HTTP_PORT env is set -if [[ -v "${NGINX_HTTP_PORT}" ]]; then +if [ ! -z "${NGINX_HTTP_PORT}" ]; then sed -i "s~listen 80~listen $NGINX_HTTP_PORT~g" $NGINX_CONF_FILE sed -i "s~listen \[\:\:\]\:80~listen [::]:$NGINX_HTTP_PORT~g" $NGINX_CONF_FILE fi