wixcs commited on
Commit
20a0ea0
·
verified ·
1 Parent(s): b4a05c1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -6
Dockerfile CHANGED
@@ -15,13 +15,20 @@
15
 
16
  #COPY --chown=user . /app
17
  #CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
18
 
19
- FROM ubuntu
20
- RUN useradd -m -u 1000 user
21
- USER user
22
- RUN apt update
23
- RUN apt-get install -y nginx
24
- CMD ["nginx"]
 
 
 
 
 
25
 
26
 
27
 
 
15
 
16
  #COPY --chown=user . /app
17
  #CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
18
+ # 使用官方 Nginx 基础镜像
19
+ FROM nginx:latest
20
 
21
+ # 将自定义 Nginx 配置文件复制到容器中
22
+ COPY nginx.conf /etc/nginx/nginx.conf
23
+
24
+ # 将静态内容复制到 Nginx 默认服务路径
25
+ COPY index.html /usr/share/nginx/html/index.html
26
+
27
+ # 暴露端口
28
+ EXPOSE 80
29
+
30
+ # 启动 Nginx
31
+ CMD ["nginx", "-g", "daemon off;"]
32
 
33
 
34