luoyutianyang commited on
Commit
1c285fd
·
verified ·
1 Parent(s): 68d8ccc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -5
Dockerfile CHANGED
@@ -8,16 +8,19 @@ WORKDIR /app
8
  COPY . .
9
 
10
  # 更新软件包数据库并安装需要的软件包
11
- RUN pacman -Sy --noconfirm
12
- RUN pacman -S nodejs npm cmake opencv icu gcc git --noconfirm
 
 
13
 
14
  # 安装Node.js依赖
15
  RUN npm install express phin npmlog jimp axios sharp
16
 
17
  # 安装 opencv4nodejs,并禁用自动构建
18
- RUN npm install opencv4nodejs
19
- RUN npm install opencv-build
20
- RUN npm run opencv4nodejs:custombuild
 
21
 
22
  # 暴露端口
23
  EXPOSE 7860
 
8
  COPY . .
9
 
10
  # 更新软件包数据库并安装需要的软件包
11
+ RUN pacman -Syu --noconfirm && \
12
+ pacman -S --noconfirm \
13
+ nodejs npm cmake opencv icu gcc git base-devel && \
14
+ npm install -g npm
15
 
16
  # 安装Node.js依赖
17
  RUN npm install express phin npmlog jimp axios sharp
18
 
19
  # 安装 opencv4nodejs,并禁用自动构建
20
+ RUN npm install opencv-build && \
21
+ npm install opencv4nodejs && \
22
+ npm config set opencv4nodejs:customBuildFlags "" && \
23
+ npm rebuild opencv4nodejs
24
 
25
  # 暴露端口
26
  EXPOSE 7860