Download Dockerfile from hern0425/cpan: direct link, hf CLI and curl.
- Browser
- Download file 732 Bytes
-
https://huggingface.co/spaces/hern0425/cpan/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/hern0425/cpan/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/hern0425/cpan/resolve/main/Dockerfile
732 Bytes
| FROM ghcr.io/gdtiti/cliproxyapi:cliproxyapiplus-gdtiti | |
| USER root | |
| # 1. 安装 Nginx 和 Go 兼容库 | |
| RUN apk add --no-cache nginx libc6-compat gcompat bash | |
| # 2. 准备工作目录 | |
| WORKDIR /app | |
| RUN cp /CLIProxyAPI/CLIProxyAPIPlus ./cli-proxy-api && chmod +x ./cli-proxy-api | |
| RUN mkdir -p /tmp/.cli-proxy-api /tmp/logs /run/nginx && chmod -R 777 /tmp /run/nginx | |
| # 3. 拷贝配置 | |
| COPY config.yaml /app/config.yaml | |
| COPY config.yaml /app/config.example.yaml | |
| # 把你以前写过的这句核心修改加回来! | |
| COPY nginx.conf /etc/nginx/nginx.conf | |
| # 4. 环境变量 | |
| ENV TZ=Asia/Shanghai | |
| EXPOSE 7860 | |
| # 5. 启动脚本:后台运行 Nginx,前台运行 API | |
| CMD ["sh", "-c", "nginx && ./cli-proxy-api --config /app/config.yaml"] | |