create: 托管 PostgreSQL 容器要在创建时接入应用网络
MemRelay-Operation: memory-save:metrix-pg-network-none-20261103 MemRelay-Resource: 272b5461-3873-460e-95fe-26118a4cea34
This commit is contained in:
@@ -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。
|
||||||
Reference in New Issue
Block a user