Spaces:
Paused
Paused
Download Dockerfile from Story19240/sub2api: direct link, hf CLI and curl.
- Browser
- Download file 507 Bytes
-
https://huggingface.co/spaces/Story19240/sub2api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Story19240/sub2api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Story19240/sub2api/resolve/main/Dockerfile
507 Bytes
| # 拉取最新镜像 | |
| FROM weishaw/sub2api:latest | |
| # 指定端口 | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| # 临时切换到 root 用户来修改文件权限 | |
| USER root | |
| # 强行给应用所在的工作目录(通常是 /app 或 /data)赋予读写权限 | |
| # 这样 sub2api 就能顺利写入数据库和配置文件了 | |
| RUN chmod -R 777 /app 2>/dev/null || true | |
| RUN chmod -R 777 /data 2>/dev/null || true | |
| RUN chmod -R 777 /workspace 2>/dev/null || true | |
| # 切换回 Hugging Face 强制要求的 1000 普通用户 | |
| USER 1000 | |