diff --git a/Dockerfile.nginx b/Dockerfile.nginx index 1ffe8d949..5d9f55adf 100644 --- a/Dockerfile.nginx +++ b/Dockerfile.nginx @@ -17,5 +17,12 @@ RUN apk update && apk add jq aws-cli COPY scripts/build-scripts/docker-nginx-entrypoint.sh /usr/local/bin/docker-nginx-entrypoint.sh RUN chmod +x /usr/local/bin/docker-nginx-entrypoint.sh +USER root +RUN touch /etc/environment && \ + chown nginx:nginx /etc/environment && \ + chmod 664 /etc/environment + +USER nginx + ENTRYPOINT ["/usr/local/bin/docker-nginx-entrypoint.sh"] CMD ["nginx", "-g", "daemon off;"] diff --git a/Dockerfile.php b/Dockerfile.php index 507c593fd..5aa8c79ba 100644 --- a/Dockerfile.php +++ b/Dockerfile.php @@ -135,6 +135,12 @@ WORKDIR /app +USER root +RUN touch /etc/environment && \ + chown www-data:www-data /etc/environment && \ + chmod 664 /etc/environment +USER www-data + ENTRYPOINT ["/app/scripts/build-scripts/docker-php-entrypoint.sh"] CMD ["php-fpm"] @@ -144,4 +150,6 @@ RUN apk add bash RUN crontab -u www-data /app/scripts/cron/commons.crontab +USER www-data + ENTRYPOINT ["/app/scripts/build-scripts/docker-cron-entrypoint.sh"] \ No newline at end of file