testcontainers-rs icon indicating copy to clipboard operation
testcontainers-rs copied to clipboard

Allow mapping container port to custom IPs in the host

Open KShivendu opened this issue 6 months ago • 1 comments

Example:

# Cluster 0: 127.0.0.*
docker run --name cluster-0-n0 -d -p 127.0.0.1:6333:6333 qdrant/qdrant:latest
docker run --name cluster-0-n1 -d -p 127.0.0.2:6333:6333 qdrant/qdrant:latest

# Cluster 1: 127.0.1.*
docker run --name cluster-1-n0 -d -p 127.0.1.1:6333:6333 qdrant/qdrant:latest
docker run --name cluster-1-n1 -d -p 127.0.1.2:6333:6333 qdrant/qdrant:latest

This should be allowed by testcontainers-rs crate as well. I'm happy to create a PR for this if you agree. Thanks! :)

KShivendu avatar May 27 '25 09:05 KShivendu

I definitely don't mind of this feature, but it should be aligned with current interfaces of testcontainers So would be glad to review & accept the PR

DDtKey avatar Oct 28 '25 03:10 DDtKey