mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Record the author of an image with 'docker commit -author'
This commit is contained in:
parent
4ef2d5c1e6
commit
227a8142a3
1 changed files with 2 additions and 1 deletions
|
@ -719,6 +719,7 @@ func (srv *Server) CmdCommit(stdin io.ReadCloser, stdout io.Writer, args ...stri
|
||||||
"commit", "[OPTIONS] CONTAINER [REPOSITORY [TAG]]",
|
"commit", "[OPTIONS] CONTAINER [REPOSITORY [TAG]]",
|
||||||
"Create a new image from a container's changes")
|
"Create a new image from a container's changes")
|
||||||
flComment := cmd.String("m", "", "Commit message")
|
flComment := cmd.String("m", "", "Commit message")
|
||||||
|
flAuthor := cmd.String("author", "", "Author (eg. \"John Hannibal Smith <hannibal@a-team.com>\"")
|
||||||
if err := cmd.Parse(args); err != nil {
|
if err := cmd.Parse(args); err != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -727,7 +728,7 @@ func (srv *Server) CmdCommit(stdin io.ReadCloser, stdout io.Writer, args ...stri
|
||||||
cmd.Usage()
|
cmd.Usage()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
img, err := srv.runtime.Commit(containerName, repository, tag, *flComment, "")
|
img, err := srv.runtime.Commit(containerName, repository, tag, *flComment, *flAuthor)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue