Skip to content

Refresh mapped ports after network attach#11846

Open
soumajitgh wants to merge 1 commit into
testcontainers:mainfrom
soumajitgh:fix/refresh-mapped-port-after-network-attach
Open

Refresh mapped ports after network attach#11846
soumajitgh wants to merge 1 commit into
testcontainers:mainfrom
soumajitgh:fix/refresh-mapped-port-after-network-attach

Conversation

@soumajitgh

@soumajitgh soumajitgh commented Jun 18, 2026

Copy link
Copy Markdown

fixes: #11779

Refresh mapped port lookup after a container is attached to another network after startup.

  • use the current container inspect data when resolving mapped ports
  • keep reported port bindings aligned with Docker's current state
  • add regression coverage for mapped port and first mapped port lookups after network changes

@soumajitgh soumajitgh requested a review from a team as a code owner June 18, 2026 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: getFirstMappedPort returns wrong port after adding secondary network

1 participant