Skip to content

Commit

Permalink
Fix file permission setting for environment file
Browse files Browse the repository at this point in the history
  • Loading branch information
mikethicke committed Oct 16, 2024
1 parent 4232010 commit b6ef54a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Dockerfile.nginx
Original file line number Diff line number Diff line change
Expand Up @@ -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;"]
8 changes: 8 additions & 0 deletions Dockerfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand All @@ -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"]

0 comments on commit b6ef54a

Please sign in to comment.