Merge pull request #21961 from yongtang/21956-docker-inspect-log-default-options
Docker inspect gave default log options even when the option is emtpy. Upstream-commit: e9bef66021a29c219c185e98db7f3017513f67a6 Component: engine
This commit is contained in:
@@ -108,16 +108,6 @@ func (daemon *Daemon) getInspectData(container *container.Container, size bool)
|
||||
hostConfig.Links = append(hostConfig.Links, fmt.Sprintf("%s:%s", child.Name, linkAlias))
|
||||
}
|
||||
|
||||
// we need this trick to preserve empty log driver, so
|
||||
// container will use daemon defaults even if daemon changes them
|
||||
if hostConfig.LogConfig.Type == "" {
|
||||
hostConfig.LogConfig.Type = daemon.defaultLogConfig.Type
|
||||
}
|
||||
|
||||
if len(hostConfig.LogConfig.Config) == 0 {
|
||||
hostConfig.LogConfig.Config = daemon.defaultLogConfig.Config
|
||||
}
|
||||
|
||||
containerState := &types.ContainerState{
|
||||
Status: container.State.StateString(),
|
||||
Running: container.State.Running,
|
||||
|
||||
Reference in New Issue
Block a user