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

@@ -6,6 +6,9 @@ type checkUsedPortsTask struct {
}
func (c checkUsedPortsTask) Run(i *Instance) error {
if i.docker == nil {
return nil
}
if ports, err := i.docker.GetPorts(); err == nil {
for _, p := range ports {
i.setUsedPort(uint16(p))