-
Notifications
You must be signed in to change notification settings - Fork 254
Conversation
rumpl
commented
May 15, 2020
•
edited
Loading
edited
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
} | ||
|
||
// PortsString returns a human readable published ports | ||
func PortsString(ports []containers.Port) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case it's useful, I implemented some presentation logic for ports in the CLI a while back (see docker/cli#581)
I also recently discovered that there's a weird discrepancy between services and containers when publishing port-ranges (still to investigate further);
For a service (docker service create
);
-p 8080-8090:80
means: map container port 80
to ports 8080 - 8090
on the host
For a container;
-p 8080-8090:80
means: map container port 80
to the first available port within 8080 - 8090
I never realised this discrepancy was there tbh (as mentioned; need to investigate further if this was on purpose or an oversight)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM