|
@@ -1702,6 +1702,8 @@ func (cli *DockerCli) CmdCommit(args ...string) error {
|
|
|
flPause := cmd.Bool([]string{"p", "-pause"}, true, "Pause container during commit")
|
|
|
flComment := cmd.String([]string{"m", "-message"}, "", "Commit message")
|
|
|
flAuthor := cmd.String([]string{"a", "#author", "-author"}, "", "Author (e.g., \"John Hannibal Smith <hannibal@a-team.com>\")")
|
|
|
+ flChanges := opts.NewListOpts(nil)
|
|
|
+ cmd.Var(&flChanges, []string{"c", "-change"}, "Apply a modification before committing the image")
|
|
|
// FIXME: --run is deprecated, it will be replaced with inline Dockerfile commands.
|
|
|
flConfig := cmd.String([]string{"#run", "#-run"}, "", "This option is deprecated and will be removed in a future version in favor of inline Dockerfile-compatible commands")
|
|
|
cmd.Require(flag.Max, 2)
|
|
@@ -1726,6 +1728,7 @@ func (cli *DockerCli) CmdCommit(args ...string) error {
|
|
|
v.Set("tag", tag)
|
|
|
v.Set("comment", *flComment)
|
|
|
v.Set("author", *flAuthor)
|
|
|
+ v.Set("changes", strings.Join(flChanges.GetAll(), "\n"))
|
|
|
|
|
|
if *flPause != true {
|
|
|
v.Set("pause", "0")
|