dock
dock copied to clipboard
Port collision handling
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.