StarrySkyWorld commited on
Commit
39c29f7
·
verified ·
1 Parent(s): b4b2b54

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -3
Dockerfile CHANGED
@@ -1,6 +1,6 @@
1
  FROM node:25.4-alpine
2
 
3
- # 安装 git(alpine 镜像默认不包含 git)
4
  RUN apk add --no-cache git
5
 
6
  # 设置工作目录
@@ -10,9 +10,15 @@ WORKDIR /app
10
  RUN git clone https://github.com/Ve-ria/ami.2api.git .
11
 
12
  # 安装依赖
13
- RUN npm install && npm run build
14
 
15
- # 暴露端口(根据实际应用需要调整,常见的是 3000)
 
 
 
 
 
 
16
  EXPOSE 3000
17
 
18
  # 启动应用
 
1
  FROM node:25.4-alpine
2
 
3
+ # 安装 git
4
  RUN apk add --no-cache git
5
 
6
  # 设置工作目录
 
10
  RUN git clone https://github.com/Ve-ria/ami.2api.git .
11
 
12
  # 安装依赖
13
+ RUN npm install
14
 
15
+ # 构建项目(添加错误检查)
16
+ RUN npm run build || echo "Build failed or not needed"
17
+
18
+ # 调试:列出文件结构
19
+ RUN ls -la && echo "=== Checking dist folder ===" && ls -la dist/ || echo "No dist folder"
20
+
21
+ # 暴露端口
22
  EXPOSE 3000
23
 
24
  # 启动应用