mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Fix environ substitutions in docker commit --change ...
The building machinery was being handed an uninitialized container Config. This changes it to use the target container's Config. Resolves #30538 Signed-off-by: Anthony Sottile <asottile@umich.edu>
This commit is contained in:
@@ -149,6 +149,10 @@ func (daemon *Daemon) Commit(name string, c *backend.ContainerCommitConfig) (str
|
||||
defer daemon.containerUnpause(container)
|
||||
}
|
||||
|
||||
if c.MergeConfigs && c.Config == nil {
|
||||
c.Config = container.Config
|
||||
}
|
||||
|
||||
newConfig, err := dockerfile.BuildFromConfig(c.Config, c.Changes)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user