Merge pull request #15170 from runcom/i-like-cleaning
Remove HostConfig,SetHostConfig from daemon.container Upstream-commit: 41d9270a40469a3226261285525c6696fd996bed Component: engine
This commit is contained in:
@@ -677,14 +677,6 @@ func (container *Container) Exposes(p nat.Port) bool {
|
||||
return exists
|
||||
}
|
||||
|
||||
func (container *Container) HostConfig() *runconfig.HostConfig {
|
||||
return container.hostConfig
|
||||
}
|
||||
|
||||
func (container *Container) SetHostConfig(hostConfig *runconfig.HostConfig) {
|
||||
container.hostConfig = hostConfig
|
||||
}
|
||||
|
||||
func (container *Container) getLogConfig() runconfig.LogConfig {
|
||||
cfg := container.hostConfig.LogConfig
|
||||
if cfg.Type != "" || len(cfg.Config) > 0 { // container has log driver configured
|
||||
|
||||
@@ -154,7 +154,7 @@ func (daemon *Daemon) Containers(config *ContainersConfig) ([]*types.Container,
|
||||
}
|
||||
newC.Created = int(container.Created.Unix())
|
||||
newC.Status = container.State.String()
|
||||
newC.HostConfig.NetworkMode = string(container.HostConfig().NetworkMode)
|
||||
newC.HostConfig.NetworkMode = string(container.hostConfig.NetworkMode)
|
||||
|
||||
newC.Ports = []types.Port{}
|
||||
for port, bindings := range container.NetworkSettings.Ports {
|
||||
|
||||
Reference in New Issue
Block a user