'docker commit -m': optional commit message

This commit is contained in:
Solomon Hykes
2013-03-23 19:16:42 -07:00
parent f7eaaa3adb
commit 0d46ddf7b4
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -181,7 +181,7 @@ func (runtime *Runtime) Destroy(container *Container) error {
// Commit creates a new filesystem image from the current state of a container.
// The image can optionally be tagged into a repository
func (runtime *Runtime) Commit(id, repository, tag string) (*Image, error) {
func (runtime *Runtime) Commit(id, repository, tag, comment string) (*Image, error) {
container := runtime.Get(id)
if container == nil {
return nil, fmt.Errorf("No such container: %s", id)
@@ -193,7 +193,7 @@ func (runtime *Runtime) Commit(id, repository, tag string) (*Image, error) {
return nil, err
}
// Create a new image from the container's base layers + a new layer from container changes
img, err := runtime.graph.Create(rwTar, container, "")
img, err := runtime.graph.Create(rwTar, container, comment)
if err != nil {
return nil, err
}