WIP
This commit is contained in:
18
pwd/check_used_ports_task.go
Normal file
18
pwd/check_used_ports_task.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package pwd
|
||||
|
||||
import "log"
|
||||
|
||||
type checkUsedPortsTask struct {
|
||||
}
|
||||
|
||||
func (c checkUsedPortsTask) Run(i *Instance) error {
|
||||
if ports, err := i.docker.GetPorts(); err == nil {
|
||||
for _, p := range ports {
|
||||
i.setUsedPort(uint16(p))
|
||||
}
|
||||
} else {
|
||||
log.Println(err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user