huiiz commited on
Commit
9c7a394
·
1 Parent(s): a0d3520
Files changed (1) hide show
  1. Dockerfile +25 -5
Dockerfile CHANGED
@@ -1,8 +1,28 @@
1
- FROM nginx:latest
2
 
3
- # RUN cat /etc/nginx/conf.d/default.conf
4
- # Copy nginx configuration
5
- # RUN chmod 777 /tmp
6
- COPY wd.conf /etc/nginx/conf.d/default.conf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
  RUN nginx -s reload
 
1
+ FROM ubuntu:latest
2
 
3
+ USER root
4
+
5
+ RUN apt-get -y update && apt-get -y install nginx
6
+
7
+ RUN mkdir -p /var/cache/nginx \
8
+ /var/log/nginx \
9
+ /var/lib/nginx
10
+ RUN touch /var/run/nginx.pid
11
+
12
+ RUN chown -R pn:pn /var/cache/nginx \
13
+ /var/log/nginx \
14
+ /var/lib/nginx \
15
+ /var/run/nginx.pid
16
+
17
+ # Install dependencies and build app as non-root
18
+ USER pn
19
+ ENV HOME=/home/pn \
20
+ PATH=/home/pn/.local/bin:$PATH
21
+
22
+ RUN mkdir $HOME/app
23
+
24
+ WORKDIR $HOME/app
25
+
26
+ COPY --chown=pn wd.conf /etc/nginx/conf.d/default.conf
27
 
28
  RUN nginx -s reload