This commit is contained in:
11notes
2022-11-02 00:17:07 +01:00
parent 77753b9b77
commit b75504f7ad
7 changed files with 20 additions and 12 deletions

View File

@@ -152,9 +152,8 @@
&& mkdir -p /nginx/ssl \
&& rm /etc/nginx/nginx.conf
# :: copy defaults
COPY ./source/etc /etc
COPY ./source/nginx /nginx
# :: copy root filesystem changes
COPY ./rootfs /
# :: docker -u 1000:1000 (no root initiative)
RUN chown nginx:nginx -R /nginx
@@ -165,5 +164,6 @@ STOPSIGNAL SIGTERM
VOLUME ["/nginx/etc", "/nginx/www", "/nginx/ssl"]
# :: Start
RUN set -ex; chmod +x /usr/local/bin/entrypoint.sh
USER nginx
CMD ["nginx", "-g", "daemon off;"]
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

View File

@@ -158,9 +158,8 @@
&& mkdir -p /nginx/ssl \
&& rm /etc/nginx/nginx.conf
# :: copy defaults
COPY ./source/etc /etc
COPY ./source/nginx /nginx
# :: copy root filesystem changes
COPY ./rootfs /
# :: docker -u 1000:1000 (no root initiative)
RUN chown nginx:nginx -R /nginx
@@ -171,5 +170,6 @@ STOPSIGNAL SIGTERM
VOLUME ["/nginx/etc", "/nginx/www", "/nginx/ssl"]
# :: Start
RUN set -ex; chmod +x /usr/local/bin/entrypoint.sh
USER nginx
CMD ["nginx", "-g", "daemon off;"]
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

View File

@@ -158,9 +158,8 @@
&& mkdir -p /nginx/ssl \
&& rm /etc/nginx/nginx.conf
# :: copy defaults
COPY ./source/etc /etc
COPY ./source/nginx /nginx
# :: copy root filesystem changes
COPY ./rootfs /
# :: docker -u 1000:1000 (no root initiative)
RUN chown nginx:nginx -R /nginx
@@ -171,5 +170,6 @@ STOPSIGNAL SIGTERM
VOLUME ["/nginx/etc", "/nginx/www", "/nginx/ssl"]
# :: Start
RUN set -ex; chmod +x /usr/local/bin/entrypoint.sh
USER nginx
CMD ["nginx", "-g", "daemon off;"]
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

View File

@@ -0,0 +1,8 @@
#!/bin/ash
if [ -z "$1" ]; then
set -- "nginx" \
-g \
daemon off
fi
exec "$@"