Spaces:
Sleeping
Sleeping
Download Dockerfile from hsukqilee/OpenCC-API: direct link, hf CLI and curl.
- Browser
- Download file 406 Bytes
-
https://huggingface.co/spaces/hsukqilee/OpenCC-API/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/hsukqilee/OpenCC-API/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/hsukqilee/OpenCC-API/resolve/main/Dockerfile
406 Bytes
| # 使用官方的 Node.js 镜像作为基础镜像 | |
| FROM node:14 | |
| # 确保有 git | |
| RUN apt-get update && apt-get install -y git | |
| # 设置工作目录 | |
| WORKDIR /app | |
| # 克隆仓库并安装依赖 | |
| RUN git clone https://github.com/HenryQW/OpenCC.henry.wang.git /app \ | |
| && npm install --production | |
| # 设置环境变量 | |
| ENV PORT=7860 | |
| # 暴露端口 7860 | |
| EXPOSE 7860 | |
| # 启动应用程序 | |
| CMD ["npm", "start"] | |