Update Dockerfile
Browse files- Dockerfile +6 -2
Dockerfile
CHANGED
@@ -24,17 +24,21 @@ USER root
|
|
24 |
RUN apt-get install -y curl unzip gnupg build-essential sudo vim git procps lsof net-tools ca-certificates openssl tzdata python3-venv gosu && \
|
25 |
ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
26 |
dpkg-reconfigure --frontend noninteractive tzdata && \
|
|
|
27 |
# 安装 Node.js 及 n8n
|
28 |
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
29 |
apt-get install -y nodejs && \
|
30 |
npm install -g n8n && \
|
31 |
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
|
|
32 |
# 创建虚拟环境并安装 Python 包
|
33 |
python3 -m venv $VIRTUAL_ENV && \
|
34 |
$VIRTUAL_ENV/bin/pip install --upgrade pip && \
|
35 |
-
$VIRTUAL_ENV/bin/pip install psycopg2-binary
|
|
|
36 |
# 更改现有的 postgres 用户 UID 和 GID 为 1000
|
37 |
-
usermod -u 1000 postgres && groupmod -g 1000 postgres
|
|
|
38 |
# 修正数据库目录的所有者和组,确保新 UID 和 GID 能正常访问
|
39 |
chown -R postgres:postgres /var/lib/postgresql && \
|
40 |
chown -R postgres:postgres /var/run/postgresql
|
|
|
24 |
RUN apt-get install -y curl unzip gnupg build-essential sudo vim git procps lsof net-tools ca-certificates openssl tzdata python3-venv gosu && \
|
25 |
ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
26 |
dpkg-reconfigure --frontend noninteractive tzdata && \
|
27 |
+
|
28 |
# 安装 Node.js 及 n8n
|
29 |
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
30 |
apt-get install -y nodejs && \
|
31 |
npm install -g n8n && \
|
32 |
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
33 |
+
|
34 |
# 创建虚拟环境并安装 Python 包
|
35 |
python3 -m venv $VIRTUAL_ENV && \
|
36 |
$VIRTUAL_ENV/bin/pip install --upgrade pip && \
|
37 |
+
$VIRTUAL_ENV/bin/pip install psycopg2-binary && \
|
38 |
+
|
39 |
# 更改现有的 postgres 用户 UID 和 GID 为 1000
|
40 |
+
usermod -u 1000 postgres && groupmod -g 1000 postgres && \
|
41 |
+
|
42 |
# 修正数据库目录的所有者和组,确保新 UID 和 GID 能正常访问
|
43 |
chown -R postgres:postgres /var/lib/postgresql && \
|
44 |
chown -R postgres:postgres /var/run/postgresql
|