iouoracle commited on
Commit
d4b80f9
1 Parent(s): e3432b8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -17
Dockerfile CHANGED
@@ -1,17 +1,24 @@
1
- FROM pengzhile/new-api AS builder
2
-
3
- FROM nginx:alpine
4
- COPY --from=builder /one-api /one-api
5
- WORKDIR /data
6
- RUN chmod +x /one-api && \
7
- mkdir -p /data && chmod 777 /data && \
8
- mkdir -p logs && chmod 777 logs && \
9
- chmod 777 /var/cache/nginx && \
10
- mkdir -p /var/log/nginx && chmod 777 /var/log/nginx && \
11
- touch /var/run/nginx.pid && chmod 777 /var/run/nginx.pid
12
-
13
- COPY nginx.conf /etc/nginx/nginx.conf
14
- EXPOSE 7860
15
- COPY start.sh /start.sh
16
- RUN chmod +x /start.sh
17
- CMD ["/start.sh"]
 
 
 
 
 
 
 
 
1
+ FROM pengzhile/new-api AS builder
2
+
3
+ FROM nginx:alpine
4
+
5
+ # 从 builder 复制文件
6
+ COPY --from=builder /one-api /one-api
7
+
8
+ # cloudflare 镜像复制 cloudflared
9
+ COPY --from=cloudflare/cloudflared:latest /usr/local/bin/cloudflared /usr/local/bin/cloudflared
10
+
11
+ WORKDIR /data
12
+ RUN chmod +x /one-api && \
13
+ mkdir -p /data && chmod 777 /data && \
14
+ mkdir -p logs && chmod 777 logs && \
15
+ chmod 777 /var/cache/nginx && \
16
+ mkdir -p /var/log/nginx && chmod 777 /var/log/nginx && \
17
+ touch /var/run/nginx.pid && chmod 777 /var/run/nginx.pid
18
+
19
+ COPY nginx.conf /etc/nginx/nginx.conf
20
+ EXPOSE 7860
21
+ COPY start.sh /start.sh
22
+ RUN chmod +x /start.sh
23
+
24
+ CMD ["/start.sh"]