dock icon indicating copy to clipboard operation
dock copied to clipboard

Port collision handling

Open bitbrain opened this issue 8 years ago • 0 comments

A port collision will occur when starting at least two containers with an exposed port in common. As a result at least one container will not start with an error message like:

docker: Error response from daemon: driver failed programming
external connectivity on endpoint dock-<formula> (<id>): 
Bind for 0.0.0.0:<port> failed: port is already allocated.

Failed to start the Docker container.

To solve this issue, formulas could provide information about their exposed ports and an "interface" to set a custom port. dock could then look up for collisions in order to assign a free port number to the respective container before they get started.

bitbrain avatar Apr 19 '16 07:04 bitbrain