ohmyapi commited on
Commit
f16f1ce
·
verified ·
1 Parent(s): 31d8793

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -3
Dockerfile CHANGED
@@ -2,17 +2,24 @@ FROM eceasy/cli-proxy-api:latest
2
 
3
  USER root
4
 
5
- RUN apk add --no-cache bash libc6-compat gcompat
6
 
7
  WORKDIR /app
8
  RUN cp /CLIProxyAPI/CLIProxyAPI ./cli-proxy-api && chmod +x ./cli-proxy-api
9
  RUN mkdir -p /tmp/.cli-proxy-api /tmp/logs /tmp/pg_cache/pgstore && chmod -R 777 /tmp
10
 
11
  COPY config.yaml /app/config.yaml
12
- # 修复 config.example.yaml 缺失
 
 
 
13
  RUN cp /app/config.yaml /app/config.example.yaml
 
 
 
 
14
 
15
  ENV TZ=Asia/Shanghai
16
  EXPOSE 7860
17
 
18
- CMD ["./cli-proxy-api", "--config", "/app/config.yaml"]
 
2
 
3
  USER root
4
 
5
+ RUN apk add --no-cache bash libc6-compat gcompat jq
6
 
7
  WORKDIR /app
8
  RUN cp /CLIProxyAPI/CLIProxyAPI ./cli-proxy-api && chmod +x ./cli-proxy-api
9
  RUN mkdir -p /tmp/.cli-proxy-api /tmp/logs /tmp/pg_cache/pgstore && chmod -R 777 /tmp
10
 
11
  COPY config.yaml /app/config.yaml
12
+ COPY cleanup_tokens.sh /app/cleanup_tokens.sh
13
+ COPY entrypoint.sh /app/entrypoint.sh
14
+
15
+ # Fix missing config.example.yaml
16
  RUN cp /app/config.yaml /app/config.example.yaml
17
+ RUN chmod +x /app/cleanup_tokens.sh /app/entrypoint.sh
18
+
19
+ # Ensure crontabs dir exists for busybox crond
20
+ RUN mkdir -p /etc/crontabs && touch /etc/crontabs/root
21
 
22
  ENV TZ=Asia/Shanghai
23
  EXPOSE 7860
24
 
25
+ CMD ["/app/entrypoint.sh"]