-
-
Notifications
You must be signed in to change notification settings - Fork 343
Closed
Labels
questionHave you tried our Slack Workspace (https://testcontainers.slack.com)?Have you tried our Slack Workspace (https://testcontainers.slack.com)?
Description
Describe the bug
When creating a eg. Postgres database container the random port mapping does not work.
To Reproduce
Steps to reproduce the behavior:
await new TestcontainersBuilder<PostgreSqlTestcontainer>()
.WithDatabase(
new PostgreSqlTestcontainerConfiguration
{
Database = "test",
Username = "user",
Password = "password"
})
.Build()
.StartAsync();
exposes some random port eg. 49132, but the actual port I can see in docker is different.
If I explicitly map the port it works.
Desktop (please complete the following information):
- Version 3.3.3 with WSL2
Additional context
Dotnet.Testcontainers v1.5.0-beta.1928
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionHave you tried our Slack Workspace (https://testcontainers.slack.com)?Have you tried our Slack Workspace (https://testcontainers.slack.com)?