Update Dockerfile
Browse files- Dockerfile +7 -4
Dockerfile
CHANGED
@@ -5,6 +5,8 @@ FROM node:20-slim AS builder
|
|
5 |
ARG requirements=requests
|
6 |
ARG PACKAGES=n8n
|
7 |
ARG WORKDIR=/app
|
|
|
|
|
8 |
|
9 |
# 安装 Python3、venv 以及必要的系统工具
|
10 |
RUN apt-get update && apt-get install -y python3 python3-venv curl gnupg build-essential && \
|
@@ -29,8 +31,6 @@ ARG WORKDIR=/app
|
|
29 |
ARG DB_IMPORT=no
|
30 |
ARG NODEJS_VER=20
|
31 |
ARG PACKAGES=n8n
|
32 |
-
ARG DUMP_URL
|
33 |
-
ARG DUMP_PASSWORD
|
34 |
|
35 |
# 设置环境变量
|
36 |
ENV POSTGRES_USER=${POSTGRES_USER} \
|
@@ -53,10 +53,13 @@ ENV POSTGRES_USER=${POSTGRES_USER} \
|
|
53 |
DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD} \
|
54 |
DB_POSTGRESDB_DATABASE=${POSTGRES_DB} \
|
55 |
VIRTUAL_ENV=/opt/venv \
|
56 |
-
PATH="$VIRTUAL_ENV/bin:/usr/local/lib/node_modules/n8n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
57 |
|
58 |
-
# 复制构建阶段的
|
|
|
59 |
COPY --from=builder /usr/local/lib/node_modules /usr/local/lib/node_modules
|
|
|
|
|
60 |
COPY --from=builder $VIRTUAL_ENV $VIRTUAL_ENV
|
61 |
|
62 |
# 安装必要的软件包并设置时区
|
|
|
5 |
ARG requirements=requests
|
6 |
ARG PACKAGES=n8n
|
7 |
ARG WORKDIR=/app
|
8 |
+
ARG DUMP_URL
|
9 |
+
ARG DUMP_PASSWORD
|
10 |
|
11 |
# 安装 Python3、venv 以及必要的系统工具
|
12 |
RUN apt-get update && apt-get install -y python3 python3-venv curl gnupg build-essential && \
|
|
|
31 |
ARG DB_IMPORT=no
|
32 |
ARG NODEJS_VER=20
|
33 |
ARG PACKAGES=n8n
|
|
|
|
|
34 |
|
35 |
# 设置环境变量
|
36 |
ENV POSTGRES_USER=${POSTGRES_USER} \
|
|
|
53 |
DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD} \
|
54 |
DB_POSTGRESDB_DATABASE=${POSTGRES_DB} \
|
55 |
VIRTUAL_ENV=/opt/venv \
|
56 |
+
PATH="$VIRTUAL_ENV/bin:/usr/local/lib/node_modules/n8n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin"
|
57 |
|
58 |
+
# 复制构建阶段的 Node.js 和 n8n
|
59 |
+
COPY --from=builder /usr/local/bin/node /usr/local/bin/
|
60 |
COPY --from=builder /usr/local/lib/node_modules /usr/local/lib/node_modules
|
61 |
+
|
62 |
+
# 复制构建阶段的 Python 运行环境
|
63 |
COPY --from=builder $VIRTUAL_ENV $VIRTUAL_ENV
|
64 |
|
65 |
# 安装必要的软件包并设置时区
|