diff --git a/docker_openresty/Dockerfile b/docker_openresty/Dockerfile index 22bd015..6318d22 100644 --- a/docker_openresty/Dockerfile +++ b/docker_openresty/Dockerfile @@ -16,6 +16,7 @@ RUN set -eux \ && useradd nginx -G www-data \ && mkdir -pv /var/cache/nginx /var/log/nginx \ && chown -R nginx:www-data /var/cache/nginx /var/log/nginx \ + && chmod +x /opt/utils/*.sh \ && source /opt/utils/script-setup.sh && setup_lua_base && setup_lua_rocks \ && source /opt/utils/script-setup-openresty.sh && setup_openresty \ && source /opt/utils/script-setup-acme.sh && setup_acme \ diff --git a/docker_openresty/work/entrypoint/docker-entrypoint.d/99-localize.sh b/docker_openresty/work/entrypoint/docker-entrypoint.d/99-localize.sh index a09ede5..827322e 100644 --- a/docker_openresty/work/entrypoint/docker-entrypoint.d/99-localize.sh +++ b/docker_openresty/work/entrypoint/docker-entrypoint.d/99-localize.sh @@ -3,12 +3,9 @@ set -eu -PROFILE_LOCALIZE=${PROFILE_LOCALIZE:-"default"} ; -echo "PROFILE_LOCALIZE=${PROFILE_LOCALIZE}" ; - # Check if the environment variable PROFILE_LOCALIZE is set and not empty -if [ -n "$PROFILE_LOCALIZE" ]; then - /bin/sh /opt/utils/script-localize.sh ; -else +if [ -z "${PROFILE_LOCALIZE+x}" ]; then echo "No action taken as PROFILE_LOCALIZE is not set or is empty." ; +else + /bin/sh /opt/utils/script-localize.sh ; fi