Skip to content

Commit 0e0df12

Browse files
committed
Ensure pidfile directory exists
1 parent a424846 commit 0e0df12

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

nginx-build/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ RUN apk add --no-cache nginx
66
RUN ln -sf /dev/stdout /var/log/nginx/access.log
77
RUN ln -sf /dev/stderr /var/log/nginx/error.log
88

9-
RUN mkdir -p /var/cache/nginx/
9+
RUN mkdir -p /var/cache/nginx/ /run/nginx/
1010
RUN adduser -D -s /bin/sh -G www-data www-data
11-
RUN chown -R www-data:www-data /var/lib/nginx/tmp/ /var/cache/nginx/
12-
RUN chmod 0755 /var/ /var/lib/ /var/lib/nginx /var/cache/ /var/cache/nginx/
11+
RUN chown -R www-data:www-data /var/lib/nginx/tmp/ /var/cache/nginx/ /run/nginx/
12+
RUN chmod 0755 /var/ /var/lib/ /var/lib/nginx /var/cache/ /var/cache/nginx/ /run/nginx/
1313

1414
COPY nginx.conf /etc/nginx/nginx.conf
1515

nginx-pod/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ RUN apk add --no-cache nginx
66
RUN ln -sf /dev/stdout /var/log/nginx/access.log
77
RUN ln -sf /dev/stderr /var/log/nginx/error.log
88

9-
RUN mkdir -p /var/cache/nginx/
9+
RUN mkdir -p /var/cache/nginx/ /run/nginx/
1010
RUN adduser -D -s /bin/sh -G www-data www-data
11-
RUN chown -R www-data:www-data /var/lib/nginx/tmp/ /var/cache/nginx/
12-
RUN chmod 0755 /var/ /var/lib/ /var/lib/nginx /var/cache/ /var/cache/nginx/
11+
RUN chown -R www-data:www-data /var/lib/nginx/tmp/ /var/cache/nginx/ /run/nginx/
12+
RUN chmod 0755 /var/ /var/lib/ /var/lib/nginx /var/cache/ /var/cache/nginx/ /run/nginx/
1313

1414
COPY nginx.conf /etc/nginx/nginx.conf
1515

0 commit comments

Comments
 (0)