Spaces:
Running
Running
Download Dockerfile from fengye39/cli-proxy-api: direct link, hf CLI and curl.
- Browser
- Download file 680 Bytes
-
https://huggingface.co/spaces/fengye39/cli-proxy-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/fengye39/cli-proxy-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/fengye39/cli-proxy-api/resolve/main/Dockerfile
680 Bytes
| FROM eceasy/cli-proxy-api:latest | |
| USER root | |
| # 💡 优化点 1:移除 apk add 行(因为它没有包管理器,且 Go 二进制程序不需要这些依赖) | |
| WORKDIR /app | |
| # 复制二进制文件 | |
| RUN cp /CLIProxyAPI/CLIProxyAPI ./cli-proxy-api && chmod +x ./cli-proxy-api | |
| # 创建必要目录 | |
| RUN mkdir -p /tmp/.cli-proxy-api /tmp/logs /tmp/pg_cache/pgstore \ | |
| && chmod -R 777 /tmp | |
| # 复制配置文件 | |
| COPY config.yaml /app/config.yaml | |
| # 关键:程序启动时需要此文件,否则报错 | |
| RUN cp /app/config.yaml /app/config.example.yaml | |
| ENV TZ=Asia/Shanghai | |
| EXPOSE 7860 | |
| # 直接运行,不使用 Nginx | |
| CMD ["./cli-proxy-api", "--config", "/app/config.yaml"] |