aigenai commited on
Commit
40c7d94
·
verified ·
1 Parent(s): 3a9e7e6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -6
Dockerfile CHANGED
@@ -11,15 +11,21 @@ ENV POSTGRES_USER=myuser \
11
  # 切换到 root 用户进行安装和用户修改
12
  USER root
13
 
14
- # 更新包管理器并安装必要软件包,包括 Python3、venvcurl
15
  RUN apt-get update && apt-get install -y \
16
  python3 \
17
  python3-pip \
18
  python3-venv \
19
- curl gosu \
20
- --no-install-recommends && \
21
- apt-get clean && \
22
- rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
23
 
24
  # 更改现有的 postgres 用户 UID 和 GID 为 1000
25
  RUN usermod -u 1000 postgres && groupmod -g 1000 postgres
@@ -44,7 +50,7 @@ USER root
44
  # 创建虚拟环境并安装 Python 包
45
  RUN python3 -m venv $VIRTUAL_ENV && \
46
  $VIRTUAL_ENV/bin/pip install --upgrade pip && \
47
- $VIRTUAL_ENV/bin/pip install Flask psycopg2-binary
48
 
49
  # 将应用程序代码和启动脚本复制到容器中
50
  COPY app.py /app/app.py
 
11
  # 切换到 root 用户进行安装和用户修改
12
  USER root
13
 
14
+ # 更新包管理器并安装必要软件包,包括 Python3、venvcurl、Node.js、n8n
15
  RUN apt-get update && apt-get install -y \
16
  python3 \
17
  python3-pip \
18
  python3-venv \
19
+ curl \
20
+ gosu \
21
+ build-essential \
22
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
23
+
24
+ # 安装 Node.js 及 n8n
25
+ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
26
+ apt-get install -y nodejs && \
27
+ npm install -g n8n && \
28
+ apt-get clean && rm -rf /var/lib/apt/lists/*
29
 
30
  # 更改现有的 postgres 用户 UID 和 GID 为 1000
31
  RUN usermod -u 1000 postgres && groupmod -g 1000 postgres
 
50
  # 创建虚拟环境并安装 Python 包
51
  RUN python3 -m venv $VIRTUAL_ENV && \
52
  $VIRTUAL_ENV/bin/pip install --upgrade pip && \
53
+ $VIRTUAL_ENV/bin/pip install psycopg2-binary
54
 
55
  # 将应用程序代码和启动脚本复制到容器中
56
  COPY app.py /app/app.py