Skip to content

Commit 98c887f

Browse files
author
f@bi.an
committed
Füge Benutzerzuweisungen für Nginx im Dockerfile hinzu und setze den Nginx-Benutzer in der Konfiguration fest.
1 parent 19b8059 commit 98c887f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ RUN mkdir -p /etc/letsencrypt /var/lib/letsencrypt /var/www/certbot
4040
RUN apk add --no-cache nginx-mod-http-brotli
4141

4242
COPY --from=builder /site/site /usr/share/nginx/html
43+
RUN chown -R nginx:nginx /usr/share/nginx/html && \
44+
chown -R nginx:nginx /var/www/certbot
45+
4346
COPY nginx.conf /etc/nginx/nginx.conf
4447
COPY entrypoint.sh /entrypoint.sh
4548

nginx.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
user nginx;
12
worker_processes auto;
23

34
events {

0 commit comments

Comments
 (0)