Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/683 resolve hostname from first network #692

Merged
merged 2 commits into from
Nov 25, 2022

Conversation

HofmeisterAn
Copy link
Collaborator

@HofmeisterAn HofmeisterAn commented Nov 25, 2022

What does this PR do?

Changes the container hostname resolution. The previous implementation only considers networks with the name bridge.

Why is it important?

If developers run in a Docker Wormhole environment, and assign a custom network, the previous implementation returned a wrong hostname. It did not consider the custom network. Custom networks cannot use the name bridge, it is a reserved name.

The fallback to NetworkSettings.Gateway does not make sense:

Deprecated: This field is only propagated when attached to the default "bridge" network. Use the information from the "bridge" network inside the Networks map instead, which contains the same information. This field was deprecated in Docker 1.9 and is scheduled to be removed in Docker 17.12.0

Related issues

@HofmeisterAn HofmeisterAn added the enhancement New feature or request label Nov 25, 2022
@netlify
Copy link

netlify bot commented Nov 25, 2022

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit ea206c2
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/63809bf3270bc60008af0b8e
😎 Deploy Preview https://deploy-preview-692--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@HofmeisterAn HofmeisterAn merged commit 2d04584 into develop Nov 25, 2022
@HofmeisterAn HofmeisterAn deleted the feature/683-resolve-hostname-from-first-network branch November 25, 2022 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running container inside container with custom network returns wrong gateway address
1 participant