shenhao commited on
Commit
a15febc
·
verified ·
1 Parent(s): ff3e80b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -10
Dockerfile CHANGED
@@ -2,22 +2,17 @@ FROM eceasy/cli-proxy-api:latest
2
 
3
  USER root
4
 
5
- # 1. 安装 Nginx Go 兼容库
6
- RUN apk add --no-cache nginx libc6-compat gcompat bash
7
 
8
- # 2. 准备工作目录
9
  WORKDIR /app
10
  RUN cp /CLIProxyAPI/CLIProxyAPI ./cli-proxy-api && chmod +x ./cli-proxy-api
11
- RUN mkdir -p /tmp/.cli-proxy-api /tmp/logs /run/nginx && chmod -R 777 /tmp /run/nginx
12
 
13
- # 3. 拷贝配置
14
  COPY config.yaml /app/config.yaml
15
- COPY config.yaml /app/config.example.yaml
16
- COPY nginx.conf /etc/nginx/nginx.conf
17
 
18
- # 4. 环境变量
19
  ENV TZ=Asia/Shanghai
20
  EXPOSE 7860
21
 
22
- # 5. 启动脚本:后台运行 Nginx,前台运行 API
23
- CMD ["sh", "-c", "nginx && ./cli-proxy-api --config /app/config.yaml"]
 
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"]