From fbbcb957c710ab817c969a8dc3ff3c46619604e2 Mon Sep 17 00:00:00 2001 From: Aditya R Date: Tue, 22 Feb 2022 22:10:34 +0530 Subject: container-commit: support --squash to squash layers into one Allow users to commit containers into a single layer. Usage ```bash podman container commit --squash ``` Signed-off-by: Aditya R --- libpod/container_commit.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libpod') 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, } -- cgit v1.2.3-54-g00ecf