diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-02-23 13:07:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-23 13:07:00 -0500 |
commit | 991c90de1fca66e7c99b864816d0292dd33b73dc (patch) | |
tree | fc405d7a90ae4d3f755a4760c17f3d84e94550f7 /libpod | |
parent | 113f855802176a4ffbe167304ab83942116a65f1 (diff) | |
parent | fbbcb957c710ab817c969a8dc3ff3c46619604e2 (diff) | |
download | podman-991c90de1fca66e7c99b864816d0292dd33b73dc.tar.gz podman-991c90de1fca66e7c99b864816d0292dd33b73dc.tar.bz2 podman-991c90de1fca66e7c99b864816d0292dd33b73dc.zip |
Merge pull request #13314 from flouthoc/container-commit-squash
container-commit: support `--squash` to squash layers into one if users want.
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_commit.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/container_commit.go b/libpod/container_commit.go index 99d08ccf1..7018ee7d8 100644 --- a/libpod/container_commit.go +++ b/libpod/container_commit.go @@ -27,6 +27,7 @@ type ContainerCommitOptions struct { Author string Message string Changes []string + Squash bool } // Commit commits the changes between a container and its image, creating a new @@ -63,6 +64,7 @@ func (c *Container) Commit(ctx context.Context, destImage string, options Contai commitOptions := buildah.CommitOptions{ SignaturePolicyPath: options.SignaturePolicyPath, ReportWriter: options.ReportWriter, + Squash: options.Squash, SystemContext: c.runtime.imageContext, PreferredManifestType: options.PreferredManifestType, } |