Spaces:
Paused
Paused
Upload 3 files
Browse files- Dockerfile +5 -2
- start.sh +1 -1
Dockerfile
CHANGED
@@ -1,9 +1,12 @@
|
|
1 |
-
FROM pengzhile/new-api
|
|
|
|
|
|
|
2 |
RUN apk add --no-cache nginx && \
|
3 |
mkdir -p /data && chmod 777 /data
|
|
|
4 |
COPY nginx.conf /etc/nginx/nginx.conf
|
5 |
EXPOSE 7860
|
6 |
-
# 创建一个启动脚本
|
7 |
COPY start.sh /start.sh
|
8 |
RUN chmod +x /start.sh
|
9 |
CMD ["/start.sh"]
|
|
|
1 |
+
FROM pengzhile/new-api AS builder
|
2 |
+
|
3 |
+
FROM alpine:3.12
|
4 |
+
COPY --from=builder /data/one-api /data/one-api
|
5 |
RUN apk add --no-cache nginx && \
|
6 |
mkdir -p /data && chmod 777 /data
|
7 |
+
|
8 |
COPY nginx.conf /etc/nginx/nginx.conf
|
9 |
EXPOSE 7860
|
|
|
10 |
COPY start.sh /start.sh
|
11 |
RUN chmod +x /start.sh
|
12 |
CMD ["/start.sh"]
|
start.sh
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
#!/bin/sh
|
2 |
|
3 |
nginx &
|
4 |
-
/one-api
|
5 |
|
|
|
1 |
#!/bin/sh
|
2 |
|
3 |
nginx &
|
4 |
+
/data/one-api
|
5 |
|