sfun commited on
Commit
273f26b
1 Parent(s): 8e840f9

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM justsong/one-api:latest
2
+
3
+ RUN apk add --no-cache pcre2
4
+
5
+ COPY --from=cloudflare/cloudflared:latest /usr/local/bin/cloudflared /usr/local/bin/cloudflared
6
+ COPY --from=nginx:alpine /etc/nginx /etc/nginx
7
+ COPY --from=nginx:alpine /usr/sbin/nginx /usr/sbin/nginx
8
+
9
+ COPY nginx.conf /etc/nginx/nginx.conf
10
+
11
+ RUN mkdir -p /var/log/nginx && \
12
+ mkdir -p /var/cache/nginx && \
13
+ mkdir -p /var/run && \
14
+ chmod -R 777 /var/log/nginx && \
15
+ chmod -R 777 /var/cache/nginx && \
16
+ chmod -R 777 /var/run
17
+
18
+ WORKDIR /data
19
+
20
+ ENV CF_TOKEN=CF_TOKEN
21
+
22
+ EXPOSE 3001
23
+
24
+ RUN chmod 777 -R /data
25
+
26
+ ENTRYPOINT cloudflared tunnel --no-autoupdate run --token $CF_TOKEN & \
27
+ nginx & \
28
+ /one-api