Browse code

Record the author of an image with 'docker commit -author'

Solomon Hykes authored on 2013/04/18 12:13:11
Showing 1 changed files
... ...
@@ -719,6 +719,7 @@ func (srv *Server) CmdCommit(stdin io.ReadCloser, stdout io.Writer, args ...stri
719 719
 		"commit", "[OPTIONS] CONTAINER [REPOSITORY [TAG]]",
720 720
 		"Create a new image from a container's changes")
721 721
 	flComment := cmd.String("m", "", "Commit message")
722
+	flAuthor := cmd.String("author", "", "Author (eg. \"John Hannibal Smith <hannibal@a-team.com>\"")
722 723
 	if err := cmd.Parse(args); err != nil {
723 724
 		return nil
724 725
 	}
... ...
@@ -727,7 +728,7 @@ func (srv *Server) CmdCommit(stdin io.ReadCloser, stdout io.Writer, args ...stri
727 727
 		cmd.Usage()
728 728
 		return nil
729 729
 	}
730
-	img, err := srv.runtime.Commit(containerName, repository, tag, *flComment, "")
730
+	img, err := srv.runtime.Commit(containerName, repository, tag, *flComment, *flAuthor)
731 731
 	if err != nil {
732 732
 		return err
733 733
 	}