summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel
diff options
context:
space:
mode:
authorAditya R <arajan@redhat.com>2022-02-22 22:10:34 +0530
committerAditya R <arajan@redhat.com>2022-02-23 17:38:28 +0530
commitfbbcb957c710ab817c969a8dc3ff3c46619604e2 (patch)
tree33971ff9377ee3cbf455ebe4c915722d3c3438bc /pkg/domain/infra/tunnel
parent0cfb5d7e75507783e463e0df645e873e5a77bbfa (diff)
downloadpodman-fbbcb957c710ab817c969a8dc3ff3c46619604e2.tar.gz
podman-fbbcb957c710ab817c969a8dc3ff3c46619604e2.tar.bz2
podman-fbbcb957c710ab817c969a8dc3ff3c46619604e2.zip
container-commit: support --squash to squash layers into one
Allow users to commit containers into a single layer. Usage ```bash podman container commit --squash <name> ``` Signed-off-by: Aditya R <arajan@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel')
-rw-r--r--pkg/domain/infra/tunnel/containers.go2
1 files changed, 1 insertions, 1 deletions
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 {