Update Dockerfile
Browse files- Dockerfile +8 -5
Dockerfile
CHANGED
|
@@ -8,16 +8,19 @@ WORKDIR /app
|
|
| 8 |
COPY . .
|
| 9 |
|
| 10 |
# 更新软件包数据库并安装需要的软件包
|
| 11 |
-
RUN pacman -
|
| 12 |
-
|
|
|
|
|
|
|
| 13 |
|
| 14 |
# 安装Node.js依赖
|
| 15 |
RUN npm install express phin npmlog jimp axios sharp
|
| 16 |
|
| 17 |
# 安装 opencv4nodejs,并禁用自动构建
|
| 18 |
-
RUN npm install
|
| 19 |
-
|
| 20 |
-
|
|
|
|
| 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
|