testcontainers / testcontainers/testcontainers-python

Feature: ryuk should be able to use TCP socket to connect to Docker engine API

未关闭
#819 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

🚀 enhancement
主要语言
Python
星标
2.3k
派生
386
平均合并
4 小时 40 分钟
30 天内合并 PR
1

描述

What are you trying to do?

I'm trying to run testcontainers on a host with Docker Engine API exposed via TCP socket instead of a Unix socket. Testcontainers run fine but ryuk fails to start because it wants to bind mount /var/run/docker.sock into container.

Using unix socket and bind mounts is hardcoded here:

https://github.com/testcontainers/testcontainers-python/blob/e7feb53fe532b6d32d5d0c5a5d517249f8e7de50/core/testcontainers/core/container.py#L285-L293

Supporting mTLS TCP sockets would also be cool. mTLS support may be split off into another issue though.

Other references:

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 core/testcontainers/core/container.py 的第 285-293 行开始,这里将 Unix socket 和 bind mount 硬编码了,并追踪 Ryuk 如何接收其 Docker 连接。明确 TCP socket 应如何配置和使用来替代它;对 mTLS 的支持可以单独保留。完成的标准是:当 Docker Engine 通过 TCP 而不是仅通过 /var/run/docker.sock 暴露时,Ryuk 能够连接。

由索引模型根据 Issue 内容生成。

评估

技术栈
docker, python
领域
devops
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。