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 --- pkg/domain/infra/tunnel/containers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/domain/infra/tunnel') diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go index 67e709486..6348a5281 100644 --- a/pkg/domain/infra/tunnel/containers.go +++ b/pkg/domain/infra/tunnel/containers.go @@ -302,7 +302,7 @@ func (ic *ContainerEngine) ContainerCommit(ctx context.Context, nameOrID string, return nil, errors.Errorf("invalid image name %q", opts.ImageName) } } - options := new(containers.CommitOptions).WithAuthor(opts.Author).WithChanges(opts.Changes).WithComment(opts.Message) + options := new(containers.CommitOptions).WithAuthor(opts.Author).WithChanges(opts.Changes).WithComment(opts.Message).WithSquash(opts.Squash) options.WithFormat(opts.Format).WithPause(opts.Pause).WithRepo(repo).WithTag(tag) response, err := containers.Commit(ic.ClientCtx, nameOrID, options) if err != nil { -- cgit v1.2.3-54-g00ecf