From 0cf4a33c7b8bb83e748d1c00461ba320d0de3675 Mon Sep 17 00:00:00 2001 From: MemRelay Date: Tue, 3 Nov 2026 14:20:12 +0800 Subject: [PATCH] =?UTF-8?q?create:=20=E6=89=98=E7=AE=A1=20PostgreSQL=20?= =?UTF-8?q?=E5=AE=B9=E5=99=A8=E8=A6=81=E5=9C=A8=E5=88=9B=E5=BB=BA=E6=97=B6?= =?UTF-8?q?=E6=8E=A5=E5=85=A5=E5=BA=94=E7=94=A8=E7=BD=91=E7=BB=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MemRelay-Operation: memory-save:metrix-pg-network-none-20261103 MemRelay-Resource: 272b5461-3873-460e-95fe-26118a4cea34 --- ... PostgreSQL 容器要在创建时接入应用网络.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 projects/d5a7f581-c442-4554-87b9-ee723b8b0258/托管 PostgreSQL 容器要在创建时接入应用网络.md diff --git a/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/托管 PostgreSQL 容器要在创建时接入应用网络.md b/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/托管 PostgreSQL 容器要在创建时接入应用网络.md new file mode 100644 index 0000000..5034ad7 --- /dev/null +++ b/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/托管 PostgreSQL 容器要在创建时接入应用网络.md @@ -0,0 +1,21 @@ +--- +title: 托管 PostgreSQL 容器要在创建时接入应用网络 +type: experience +permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/托管-postgre-sql-容器要在创建时接入应用网络 +stable_id: 272b5461-3873-460e-95fe-26118a4cea34 +scope: project +memory_type: experience +project_id: d5a7f581-c442-4554-87b9-ee723b8b0258 +usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998 +status: active +revision: 1 +request_id: metrix-pg-network-none-20261103 +created_at: '2026-11-03T06:20:09.345539+00:00' +updated_at: '2026-11-03T06:20:09.345539+00:00' +tags: +- app-hosting +- docker +- postgres +--- + +Docker 29 不允许把创建时使用 network_mode=none 的容器再接入另一个网络,报错:container cannot be connected to multiple networks with one of the networks in private (none) mode。Metrix 托管 PostgreSQL 要在 containers.create 时直接传入应用网络,并用 networking_config 设置 Aliases 为 postgres。已经停在 none 网络上的同名容器要先删掉再按新方式创建。修复提交为 feat/app-hosting e208cd4。 \ No newline at end of file