浏览代码

daemon/commit: remove unneeded code

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Ma Shimiao 9 年之前
父节点
当前提交
ab868ad79c
共有 1 个文件被更改,包括 1 次插入12 次删除
  1. 1 12
      daemon/commit.go

+ 1 - 12
daemon/commit.go

@@ -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 (
-		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)
+	img, err := daemon.graph.Create(rwTar, container.ID, container.ImageID, c.Comment, c.Author, container.Config, c.Config)
 	if err != nil {
 	if err != nil {
 		return nil, err
 		return nil, err
 	}
 	}