Update Dockerfile
Browse files- Dockerfile +24 -17
Dockerfile
CHANGED
@@ -1,17 +1,24 @@
|
|
1 |
-
FROM pengzhile/new-api AS builder
|
2 |
-
|
3 |
-
FROM nginx:alpine
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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"]
|