dockertest
dockertest copied to clipboard
fix: trying to bind to an outbound ip returns an empty list of port bindings
trafficstars
Keep calling docker inspect with a short delay until all port bindings are properly populated.
Related Issue or Design Document
When trying to bind to an outbound interface, the first docker inspect call right after the container has been created doesn't return port bindings properly in the response. This causes an empty host/port to be calculated by the resource.
Checklist
- [x] I have read the contributing guidelines and signed the CLA.
- [ ] I have referenced an issue containing the design document if my change introduces a new feature.
- [x] I have read the security policy.
- [x] I confirm that this pull request does not address a security vulnerability. If this pull request addresses a security vulnerability, I confirm that I got approval (please contact [email protected]) from the maintainers to push the changes.
- [x] I have added tests that prove my fix is effective or that my feature works.
- [x] I have added the necessary documentation within the code base (if appropriate).