summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/commit.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/cmd/podman/commit.go b/cmd/podman/commit.go
index 14b7ddace..105ab2d99 100644
--- a/cmd/podman/commit.go
+++ b/cmd/podman/commit.go
@@ -1,6 +1,7 @@
package main
import (
+ "encoding/json"
"fmt"
"io"
"os"
@@ -120,7 +121,17 @@ func commitCmd(c *cli.Context) error {
Changes: c.StringSlice("change"),
Author: c.String("author"),
}
- newImage, err := ctr.Commit(getContext(), reference, options)
+ var createArtifact createConfig
+ artifact, err := ctr.GetArtifact("create-config")
+ if err == nil {
+ if err := json.Unmarshal(artifact, &createArtifact); err != nil {
+ return err
+ }
+ }
+ mounts := getMounts(createArtifact.Volumes, true)
+ command := createArtifact.Command
+ entryPoint := createArtifact.Entrypoint
+ newImage, err := ctr.Commit(getContext(), reference, options, strings.Split(mounts, ","), command, entryPoint)
if err != nil {
return err
}