1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-10-05 01:43:22 +08:00

Show docker swarm used ports

This commit is contained in:
Jonathan Leibiusky (@xetorthio)
2016-12-05 09:21:43 -03:00
parent a7811b4e33
commit 69050373d7
10 changed files with 110 additions and 15 deletions

View File

@@ -5,6 +5,8 @@ type checkUsedPortsTask struct {
func (c checkUsedPortsTask) Run(i *Instance) {
if ports, err := GetUsedPorts(i); err == nil {
i.Ports = ports
for _, p := range ports {
i.setUsedPort(p)
}
}
}