yxmiler commited on
Commit
a725d08
·
verified ·
1 Parent(s): 1536dc4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -31
Dockerfile CHANGED
@@ -1,32 +1,31 @@
1
- FROM node:18-slim
2
-
3
- # 安装 Chrome 依赖
4
- RUN apt-get update && apt-get install -y \
5
- wget \
6
- gnupg \
7
- ca-certificates \
8
- procps \
9
- chromium \
10
- chromium-sandbox
11
-
12
- # 设置工作目录
13
- WORKDIR /app
14
-
15
- # 复制 package.json 和 package-lock.json
16
- COPY package*.json ./
17
-
18
- # 安装依赖
19
- RUN npm install
20
-
21
- # 复制源代码
22
- COPY . .
23
-
24
- # 设置环境变量
25
- ENV CHROME_PATH=/usr/bin/chromium
26
- ENV PORT=7860
27
-
28
- # 暴露端口
29
- EXPOSE 7860
30
-
31
- # 启动应用
32
  CMD ["npm", "start"]
 
1
+ FROM node:18-slim
2
+
3
+ # 安装 Chrome 依赖
4
+ RUN apt-get update && apt-get install -y \
5
+ wget \
6
+ gnupg \
7
+ ca-certificates \
8
+ procps \
9
+ chromium \
10
+ chromium-sandbox
11
+
12
+ # 设置工作目录
13
+ WORKDIR /app
14
+
15
+ # 复制 package.json 和 package-lock.json
16
+ COPY package*.json ./
17
+
18
+ # 安装依赖
19
+ RUN npm install
20
+
21
+ # 复制源代码
22
+ COPY . .
23
+
24
+ # 设置环境变量
25
+ ENV PORT=7860
26
+
27
+ # 暴露端口
28
+ EXPOSE 7860
29
+
30
+ # 启动应用
 
31
  CMD ["npm", "start"]