KilersBotz commited on
Commit
44f50a4
·
verified ·
1 Parent(s): 3596483

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -21
Dockerfile CHANGED
@@ -1,26 +1,15 @@
1
- # 使用archlinux基础镜像
2
- FROM archlinux:latest
3
 
4
- # 设置大陆时区
5
- ENV TZ Asia/Shanghai
 
6
 
7
- # 设置工作目录
8
- WORKDIR /puppeteer
9
 
10
- # 将本地的所有文件复制到工作目录
 
 
11
  COPY . .
12
 
13
- # 安装依赖
14
- RUN chmod -R 777 /puppeteer
15
- RUN pacman -Syu --noconfirm
16
- RUN pacman -S --noconfirm nodejs npm
17
- RUN pacman -S --noconfirm chromium
18
- RUN pacman -S --noconfirm wqy-microhei
19
- RUN npm install -g pnpm
20
- RUN pnpm install -P
21
-
22
- # 暴露端口
23
- EXPOSE 7860
24
-
25
- # 启动!
26
- CMD ["node", "."]
 
1
+ FROM node:20-slim
 
2
 
3
+ # Install Chromium & deps
4
+ RUN apt-get update && apt-get install -y chromium && \
5
+ apt-get clean && rm -rf /var/lib/apt/lists/*
6
 
7
+ # Set path Chromium buat Puppeteer
8
+ ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
9
 
10
+ WORKDIR /app
11
+ COPY package*.json ./
12
+ RUN npm install
13
  COPY . .
14
 
15
+ CMD ["node", "index.js"]