maestro-ng icon indicating copy to clipboard operation
maestro-ng copied to clipboard

Unable to port bind to specific interface for given exposed port, leaving external port random

Open corradio opened this issue 9 years ago • 1 comments

It's currently not possible to bind an exposed port to a random external port, specifying the interface.

and the docker-py api supports it like this:

c.start(container_id, port_bindings={1111: ('127.0.0.1',)})

ref: https://github.com/docker/docker-py/blob/4ed1ee5b0fc8c527e96ff00cba23f69420617454/docs/port-bindings.md

It's a shame because we need this to allow proper service discovery on a specific interface :)

Also, Fig supports it with:

ports:
        - "10.181.8.1::9005"

corradio avatar Oct 30 '14 15:10 corradio

You're correct, it's not possible to map to a random external port. I didn't implement support for this because I had a hard time figuring out a good use case for it, but I guess I could look into it.

mpetazzoni avatar Oct 30 '14 17:10 mpetazzoni