silencewing commited on
Commit
37fbd48
1 Parent(s): 7543d1c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -5
Dockerfile CHANGED
@@ -15,17 +15,25 @@ FROM nginx:latest
15
  EXPOSE 8080
16
 
17
 
18
- RUN useradd -m -u 1000 user
19
- # Switch to the "user" user
20
  USER user
 
 
 
 
 
21
 
22
  # Set home to the user's home directory
23
- ENV HOME=/home/user \
24
- PATH=/home/user/.local/bin:$PATH
25
  # Set the working directory to the user's home directory
26
  WORKDIR $HOME
27
  #RUN mkdir /usr/share/nginx/html/app
28
  #RUN chown user /usr/share/nginx/html/app
29
- COPY --chown=user . /usr/share/nginx/html/
 
 
 
 
30
 
31
  CMD ["nginx","-g","daemon off;"]
 
15
  EXPOSE 8080
16
 
17
 
18
+ RUN chown -R 1000 /var/log/nginx/ /var/lib/nginx/ /run/
 
19
  USER user
20
+ ENV HOME /home/user
21
+
22
+ #RUN useradd -m -u 1000 user
23
+ # Switch to the "user" user
24
+ #USER user
25
 
26
  # Set home to the user's home directory
27
+ #ENV HOME=/home/user \
28
+ #PATH=/home/user/.local/bin:$PATH
29
  # Set the working directory to the user's home directory
30
  WORKDIR $HOME
31
  #RUN mkdir /usr/share/nginx/html/app
32
  #RUN chown user /usr/share/nginx/html/app
33
+ COPY --chown=user:user . /usr/share/nginx/html/
34
+
35
+ COPY --chown=user:user ./app /home/user/app
36
+ COPY ./default /etc/nginx/sites-available
37
+ COPY --chown=user:user ./htpasswd /etc/nginx
38
 
39
  CMD ["nginx","-g","daemon off;"]