Feature: A way to construct a `Network` object for an existing docker network
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- docker, python
- 领域
- devops, infrastructure
调研方向
从 core/testcontainers/core/network.py 中 Network 的 name 属性附近开始,并检查 DockerContainer.with_network。确定如何表示现有网络的名称而不创建或管理该网络,然后验证 DockerContainer 启动时可以连接到该网络。
由索引模型根据 Issue 内容生成。
描述
What are you trying to do?
Attach a DockerContainer to an existing network. In my specific case, the network was created as part of a composable setup, and I'd like to attach a new container to that network.
Why should it be done this way?
I suppose my suggestion would be a way to construct a Network object by simply passing the name in as an argument. Best I can tell that name property is all that is really needed when the DockerContainer is started.
A perhaps easier way might be to create a new class
class ExistingNetwork:
def __init__(self, network_name: str):
self.name = network_name
While this I think could be passed into DockerContainer.with_network & it seems to work, it might be better to have this inherit Network and explicitly override the other methods in the Network class to ensure they are not called.
- 主要语言
- Python
- 星标
- 2.3k
- 派生
- 389
- 平均合并
- 4 小时 40 分钟
- 30 天内合并 PR
- 1
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
testcontainers/testcontainers-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
testcontainers/testcontainers-python#1115 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
testcontainers/testcontainers-python#1111 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
testcontainers/testcontainers-python#1086 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
testcontainers/testcontainers-python#578 · 5 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 76/100
testcontainers/testcontainers-python#1125 ·
维护者通常 1 天内回复
查看 testcontainers/testcontainers-python 的全部 Issue
相似的 Issue
-
Improve Task Cache Windows Registry events to carry the task subkey's last written time and key path未关闭
难度 2/5 1-3 小时 新手友好度 88/100
log2timeline/plaso#5299 · 1 条评论 ·
维护者通常 2 天内回复
-
deployment release-lag
难度 2/5 1-3 小时 新手友好度 68/100
nolte/kamerplanter#2047 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
ClanGenOfficial/clangen#6216 · 1 条评论 ·
维护者通常 1 天内回复
-
API bug connectors
难度 2/5 1-3 小时 新手友好度 92/100
pyinfra-dev/pyinfra#1986 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
521xueweihan/HelloGitHub#3847 ·