StarrySkyWorld commited on
Commit
b3931f2
·
verified ·
1 Parent(s): 7f14673

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 1. 使用 Node.js 基础镜像
2
+ FROM node:18-slim
3
+
4
+ # 2. 安装 git 以便克隆仓库
5
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
6
+
7
+ # 3. 设置工作目录
8
+ WORKDIR /app
9
+
10
+ # 4. 自动克隆仓库
11
+ # 这里直接克隆你指定的 GitHub 地址
12
+ RUN git clone https://github.com/ZeroAd-06/UNITY2api.git .
13
+
14
+ # 5. 安装依赖
15
+ RUN npm install
16
+
17
+ # 6. 强制设置端口为 7860 (Hugging Face 要求的唯一指定端口)
18
+ ENV PORT=7860
19
+ EXPOSE 7860
20
+
21
+ # 7. 启动服务
22
+ CMD ["npm", "start"]