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

Open
#819 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker, python
Domain
devops

Research direction

Start in core/testcontainers/core/container.py at lines 285-293, where the Unix socket and bind mount are hardcoded, and trace how Ryuk receives its Docker connection. Define how a TCP socket should be configured and used instead; supporting mTLS can remain separate. Done means Ryuk can connect when Docker Engine is exposed through TCP rather than only /var/run/docker.sock.

Written by the indexing model from the issue text.

Description

🚀 enhancement

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:

Dominant language
Python
Stars
2.3k
Forks
397
Avg merge
8d 16h
Merged PRs (30d)
5

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from testcontainers/testcontainers-python

All issues in testcontainers/testcontainers-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.