Download Dockerfile from gdtiti/unity: direct link, hf CLI and curl.
- Browser
- Download file 508 Bytes
-
https://huggingface.co/spaces/gdtiti/unity/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/gdtiti/unity/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/gdtiti/unity/resolve/main/Dockerfile
508 Bytes
| # 1. 使用 Node.js 基础镜像 | |
| FROM node:18-slim | |
| # 2. 安装 git 以便克隆仓库 | |
| RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | |
| # 3. 设置工作目录 | |
| WORKDIR /app | |
| # 4. 自动克隆仓库 | |
| # 这里直接克隆你指定的 GitHub 地址 | |
| RUN git clone https://github.com/ZeroAd-06/UNITY2api.git . | |
| # 5. 安装依赖 | |
| RUN npm install | |
| # 6. 强制设置端口为 7860 (Hugging Face 要求的唯一指定端口) | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| # 7. 启动服务 | |
| CMD ["npm", "start"] |