Selinore commited on
Commit
f1e3a3b
·
verified ·
1 Parent(s): 0905b66

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM pengzhile/new-api as neoapi
2
+ FROM nginx:alpine
3
+
4
+ EXPOSE 7860
5
+
6
+ # 创建所有必要的目录并设置权限
7
+ RUN mkdir -p /data/logs && \
8
+ mkdir -p /logs && \
9
+ chmod -R 777 /data && \
10
+ chmod -R 777 /logs
11
+
12
+ # Nginx相关目录设置
13
+ RUN chmod 777 /var/cache/nginx && \
14
+ mkdir -p /var/log/nginx && \
15
+ chmod 777 /var/log/nginx && \
16
+ touch /var/run/nginx.pid && \
17
+ chmod 777 /var/run/nginx.pid
18
+
19
+ # 从oneapi镜像复制必要的文件
20
+ COPY --from=neoapi /neo-api /neo-api
21
+ COPY --from=neoapi /data /data
22
+
23
+ # 复制配置文件
24
+ COPY nginx.conf /etc/nginx/nginx.conf
25
+ COPY start.sh /start.sh
26
+ RUN chmod +x /start.sh && \
27
+ chmod +x /neo-api/server
28
+
29
+ CMD ["/start.sh"]