Make sure not to treat the instance as a docker host always, as it might

not be one.
This commit is contained in:
Jonathan Leibiusky @xetorthio
2017-05-29 10:19:01 -03:00
parent b0b9269ccc
commit 2e63e541f3
6 changed files with 47 additions and 33 deletions

View File

@@ -9,6 +9,9 @@ type checkSwarmUsedPortsTask struct {
}
func (c checkSwarmUsedPortsTask) Run(i *Instance) error {
if i.docker == nil {
return nil
}
if i.IsManager != nil && *i.IsManager {
sessionPrefix := i.session.Id[:8]
// This is a swarm manager instance, then check for ports