-
Notifications
You must be signed in to change notification settings - Fork 369
Open
Description
Description
When using an SSH-based DOCKER_HOST (e.g. ssh://user@remote-host), testcontainers cannot connect to containers.
The Docker Python SDK rewrites SSH URLs internally to http+docker://ssh, losing the original hostname. DockerClient.host() then parses that rewritten URL and returns "ssh" instead of the actual remote hostname. This breaks get_container_host_ip(), get_exposed_port(), and any code that relies on the host address to reach containers.
Reproduction
export DOCKER_HOST="ssh://user@10.0.0.1"
python -c "from testcontainers.core.docker_client import DockerClient
print(DockerClient().host())"Expected: 10.0.0.1
Actual: ssh
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels