From 949798a17f71a1c163c60b69a24e59ccae083941 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 26 Oct 2023 12:19:30 +0100 Subject: [PATCH] 7 --- Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 032c7dd..74f64a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,12 +28,15 @@ FROM alpine:latest RUN apk update && apk upgrade RUN apk add pcre pcre-dev + +RUN mkdir /usr/local/nginx +RUN mkdir /var/log/nginx + RUN touch /usr/local/nginx/logs/error.log RUN touch /usr/local/nginx/logs/access.log -RUN mkdir /usr/local/nginx && chmod -R 770 /usr/local/nginx -RUN mkdir /var/log/nginx && chmod -R 770 /var/log/nginx - +RUN chmod -R 770 /usr/local/nginx +RUN chmod -R 770 /var/log/nginx # Copy Nginx binary and configuration from the build stage COPY --from=build /usr/local/sbin/nginx /usr/local/sbin/nginx