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