mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-07-15 18:57:28 +08:00
Check that instance is present when setting ports
This commit is contained in:
parent
b48812b085
commit
bfbe3abed5
@ -88,8 +88,10 @@ func SetInstanceSwarmPorts(i *Instance) error {
|
||||
for _, t := range tasks {
|
||||
for _, n := range nodes {
|
||||
ins := nodesIdx[n.ID]
|
||||
for _, p := range services[t.ServiceID] {
|
||||
ins.setUsedPort(p)
|
||||
if ins != nil {
|
||||
for _, p := range services[t.ServiceID] {
|
||||
ins.setUsedPort(p)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user