Update Dockerfile
Browse files- Dockerfile +3 -5
Dockerfile
CHANGED
@@ -21,7 +21,7 @@ ENV N8N_PAYLOAD_SIZE_MAX=256
|
|
21 |
USER root
|
22 |
|
23 |
# 更新包管理器并安装必要软件包,包括 Python3、venv、curl、Node.js、n8n
|
24 |
-
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
|
@@ -33,12 +33,10 @@ apt-get install -y curl unzip gnupg build-essential sudo vim git procps lsof net
|
|
33 |
python3 -m venv $VIRTUAL_ENV && \
|
34 |
$VIRTUAL_ENV/bin/pip install --upgrade pip && \
|
35 |
$VIRTUAL_ENV/bin/pip install psycopg2-binary
|
36 |
-
|
37 |
# 更改现有的 postgres 用户 UID 和 GID 为 1000
|
38 |
-
|
39 |
-
|
40 |
# 修正数据库目录的所有者和组,确保新 UID 和 GID 能正常访问
|
41 |
-
|
42 |
chown -R postgres:postgres /var/run/postgresql
|
43 |
|
44 |
# 切换到 postgres 用户,初始化数据库并创建角色
|
|
|
21 |
USER root
|
22 |
|
23 |
# 更新包管理器并安装必要软件包,包括 Python3、venv、curl、Node.js、n8n
|
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
|
|
|
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
|
41 |
|
42 |
# 切换到 postgres 用户,初始化数据库并创建角色
|