Skip to content

[Bug]: PortBinding does not work anymore since 1.19.2 #7874

@Eng-Fouad

Description

@Eng-Fouad

Module

Core

Testcontainers version

1.19.2 & 1.19.3

Using the latest Testcontainers version?

Yes

Host OS

Windows

Host Arch

x64

Docker version

Docker Desktop 4.25.2 (129061)

What happened?

MSSQLServerContainer mssqlserver = new MSSQLServerContainer();
mssqlserver.getPortBindings().add("5555:1433");

In 1.19.1, it was working fine.
In 1.19.2, it picks random port instead of using 5555.

Relevant log output

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions