Random port binding not showing up in the .attr object
See original GitHub issueI run a container and use the option ports={8000: None}
in order to assign random port binding for this container. I then try to print the container.attr to look for what port did it bind to. It always get empty values: u'PortBindings': {u'8000/tcp': [{u'HostPort': u'', u'HostIp': u''}]}
I use the shell to make sure the container is running and binding ports correctly, and it works just fine. The container is indeed running the ports are bind correctly. But I need to access the port binding from the container object.
What is the problem here?
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Can i add a port binding to a docker container while ...
With this project, VS binds a random port to the exposed port. enter image description here. Is there anyway i can add a...
Read more >Configure Port Binding for iSCSI or iSER - VMware Docs
The port binding creates connections for the traffic between certain types of iSCSI and iSER adapters and the physical network adapters.
Read more >Joint API - JointJS
An object containing at least an id of the Element to which we are ... group attribute comes to play when you're not...
Read more >R.attr | Android Developers
Reference to a theme that should be used to inflate popups shown by widgets ... their own Context objects and not appear in...
Read more >Jupyter Notebook Documentation - Read the Docs
By default the first notebook server starts on port 8888, ... Javascript and HTML output will not be displayed until they are regenerated...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I believe you will have to call
container.reload()
to refresh the container info after it’s allocated a port (i.e. once it’s been started).Same issue.
Version 17.03.0-ce-mac2 (15654)
docker-py (1.10.6)