|
|
|
@ -10,6 +10,7 @@ import (
|
|
|
|
|
|
|
|
|
|
"github.com/docker/docker/api/types"
|
|
|
|
|
dockercontainer "github.com/docker/docker/api/types/container"
|
|
|
|
|
"github.com/docker/go-connections/nat"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// NewContainer returns a new Container instance instantiated with the
|
|
|
|
@ -208,8 +209,6 @@ func (c Container) PreUpdateTimeout() int {
|
|
|
|
|
return minutes
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// StopSignal returns the custom stop signal (if any) that is encoded in the
|
|
|
|
|
// container's metadata. If the container has not specified a custom stop
|
|
|
|
|
// signal, the empty string "" is returned.
|
|
|
|
@ -319,8 +318,10 @@ func (c Container) VerifyConfiguration() error {
|
|
|
|
|
return errorInvalidConfig
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Instead of returning an error here, we just create an empty map
|
|
|
|
|
// This should allow for updating containers where the exposed ports are missing
|
|
|
|
|
if len(hostConfig.PortBindings) > 0 && containerConfig.ExposedPorts == nil {
|
|
|
|
|
return errorNoExposedPorts
|
|
|
|
|
containerConfig.ExposedPorts = make(map[nat.Port]struct{})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return nil
|
|
|
|
|