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