Spaces:
Sleeping
Sleeping
silencewing
commited on
Commit
•
24f0332
1
Parent(s):
80ffa4f
Update Dockerfile
Browse files- Dockerfile +4 -2
Dockerfile
CHANGED
@@ -5,6 +5,7 @@ FROM ubuntu:latest
|
|
5 |
# RUN apt-get install -y vim
|
6 |
|
7 |
# RUN apt-get install -y nginx
|
|
|
8 |
# 以上执行会创建 3 层镜像。可简化为以下格式:
|
9 |
|
10 |
RUN apt-get update && apt-get install -y vim && apt-get install -y nginx
|
@@ -23,7 +24,8 @@ ENV HOME=/home/user \
|
|
23 |
PATH=/home/user/.local/bin:$PATH
|
24 |
# Set the working directory to the user's home directory
|
25 |
WORKDIR $HOME
|
26 |
-
RUN mkdir /usr/share/nginx/html/app
|
27 |
-
RUN chown user /usr/share/nginx/html/app
|
|
|
28 |
|
29 |
CMD ["nginx","-g","daemon off;"]
|
|
|
5 |
# RUN apt-get install -y vim
|
6 |
|
7 |
# RUN apt-get install -y nginx
|
8 |
+
|
9 |
# 以上执行会创建 3 层镜像。可简化为以下格式:
|
10 |
|
11 |
RUN apt-get update && apt-get install -y vim && apt-get install -y nginx
|
|
|
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;"]
|