Skip to content

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

@snowflyak

Description

@snowflyak

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:

Reaper._container = (
DockerContainer(c.ryuk_image)
.with_name(f"testcontainers-ryuk-{SESSION_ID}")
.with_exposed_ports(8080)
.with_volume_mapping(c.ryuk_docker_socket, "/var/run/docker.sock", "rw")
.with_kwargs(privileged=c.ryuk_privileged, auto_remove=True)
.with_env("RYUK_RECONNECTION_TIMEOUT", c.ryuk_reconnection_timeout)
.start()
)

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

Other references:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions