mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
daemon/commit: remove unneeded code
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
This commit is contained in:
parent
84bc41a3fb
commit
ab868ad79c
1 changed files with 1 additions and 12 deletions
|
@ -35,18 +35,7 @@ func (daemon *Daemon) Commit(container *Container, c *ContainerCommitConfig) (*i
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// Create a new image from the container's base layers + a new layer from container changes
|
// Create a new image from the container's base layers + a new layer from container changes
|
||||||
var (
|
img, err := daemon.graph.Create(rwTar, container.ID, container.ImageID, c.Comment, c.Author, container.Config, c.Config)
|
||||||
containerID, parentImageID string
|
|
||||||
containerConfig *runconfig.Config
|
|
||||||
)
|
|
||||||
|
|
||||||
if container != nil {
|
|
||||||
containerID = container.ID
|
|
||||||
parentImageID = container.ImageID
|
|
||||||
containerConfig = container.Config
|
|
||||||
}
|
|
||||||
|
|
||||||
img, err := daemon.graph.Create(rwTar, containerID, parentImageID, c.Comment, c.Author, containerConfig, c.Config)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue