2015-07-09 22:12:36 +00:00
|
|
|
package runconfig
|
|
|
|
|
2016-01-08 00:18:34 +00:00
|
|
|
import (
|
|
|
|
"github.com/docker/engine-api/types/container"
|
|
|
|
networktypes "github.com/docker/engine-api/types/network"
|
|
|
|
)
|
2015-12-18 18:36:17 +00:00
|
|
|
|
2015-07-09 22:12:36 +00:00
|
|
|
// ContainerConfigWrapper is a Config wrapper that hold the container Config (portable)
|
|
|
|
// and the corresponding HostConfig (non-portable).
|
|
|
|
type ContainerConfigWrapper struct {
|
2015-12-18 18:36:17 +00:00
|
|
|
*container.Config
|
2016-01-08 00:18:34 +00:00
|
|
|
HostConfig *container.HostConfig `json:"HostConfig,omitempty"`
|
|
|
|
NetworkingConfig *networktypes.NetworkingConfig `json:"NetworkingConfig,omitempty"`
|
2015-07-09 22:12:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// getHostConfig gets the HostConfig of the Config.
|
2015-12-18 18:36:17 +00:00
|
|
|
func (w *ContainerConfigWrapper) getHostConfig() *container.HostConfig {
|
2015-07-09 22:12:36 +00:00
|
|
|
return w.HostConfig
|
|
|
|
}
|