From a58e52e1b8a7bb68bb4b613eb29775a6d73e2019 Mon Sep 17 00:00:00 2001 From: David Schneiderbauer Date: Fri, 7 Feb 2025 12:27:50 +0100 Subject: [PATCH] chore: remove IPv4 Host IP from Port Binding --- src/Testcontainers/Clients/ContainerConfigurationConverter.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Testcontainers/Clients/ContainerConfigurationConverter.cs b/src/Testcontainers/Clients/ContainerConfigurationConverter.cs index 4d3ec077c..d47b0e362 100644 --- a/src/Testcontainers/Clients/ContainerConfigurationConverter.cs +++ b/src/Testcontainers/Clients/ContainerConfigurationConverter.cs @@ -148,9 +148,8 @@ public ToPortBindings() public override IEnumerable>> Convert([CanBeNull] IEnumerable> source) { - // https://github.com/moby/moby/pull/41805#issuecomment-893349240. return source?.Select(portBinding => new KeyValuePair>( - GetQualifiedPort(portBinding.Key), new[] { new PortBinding { HostIP = IPAddress.Any.ToString(), HostPort = portBinding.Value } })); + GetQualifiedPort(portBinding.Key), new[] { new PortBinding { HostPort = portBinding.Value } })); } } }