BinaryONe commited on
Commit
07dc4f3
·
1 Parent(s): 9b4ebe2

Nginx Changes-Over Alpine

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -8
Dockerfile CHANGED
@@ -8,14 +8,6 @@ RUN apk update && apk upgrade && \
8
  #RUN addgroup -S appgroup && adduser -S appuser -G appgroup
9
  RUN adduser -D -g 'user' user
10
 
11
- # Create necessary directories and set correct permissions (fix ownership)
12
- RUN mkdir -p /var/www/html /var/log/nginx /run/nginx /run/openrc && \
13
- chown -R nginx:nginx /var/lib/nginx /var/log/nginx /run/nginx && \
14
- chown -R user:user /app /var/www/html /var/lib/nginx && chmod -R 777 /app
15
-
16
- # Create the softlevel file (CRUCIAL FIX)
17
- RUN touch /run/openrc/softlevel
18
-
19
  # Set working directory
20
  WORKDIR /app
21
 
@@ -41,6 +33,14 @@ COPY nginx.conf /etc/nginx/nginx.conf
41
  RUN cat /etc/nginx/nginx.conf && echo "--------------------"
42
  # && cat /etc/nginx/conf.d/default.conf
43
 
 
 
 
 
 
 
 
 
44
  # Switch to non-root user
45
  USER user
46
 
 
8
  #RUN addgroup -S appgroup && adduser -S appuser -G appgroup
9
  RUN adduser -D -g 'user' user
10
 
 
 
 
 
 
 
 
 
11
  # Set working directory
12
  WORKDIR /app
13
 
 
33
  RUN cat /etc/nginx/nginx.conf && echo "--------------------"
34
  # && cat /etc/nginx/conf.d/default.conf
35
 
36
+ # Create necessary directories and set correct permissions (fix ownership)
37
+ RUN mkdir -p /var/www/html /var/log/nginx /run/nginx /run/openrc && \
38
+ chown -R nginx:nginx /var/lib/nginx /var/log/nginx /run/nginx && \
39
+ chown -R user:user /app /var/www/html /var/lib/nginx && chmod -R 777 /app
40
+
41
+ # Create the softlevel file (CRUCIAL FIX)
42
+ RUN touch /run/openrc/softlevel
43
+
44
  # Switch to non-root user
45
  USER user
46