summaryrefslogtreecommitdiff
path: root/pkg/bindings
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/bindings
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/bindings')
-rw-r--r--pkg/bindings/containers/types.go1
-rw-r--r--pkg/bindings/containers/types_commit_options.go15
2 files changed, 16 insertions, 0 deletions
diff --git a/pkg/bindings/containers/types.go b/pkg/bindings/containers/types.go
index 4915e3e23..66b90af9b 100644
--- a/pkg/bindings/containers/types.go
+++ b/pkg/bindings/containers/types.go
@@ -30,6 +30,7 @@ type CommitOptions struct {
Comment *string
Format *string
Pause *bool
+ Squash *bool
Repo *string
Tag *string
}
diff --git a/pkg/bindings/containers/types_commit_options.go b/pkg/bindings/containers/types_commit_options.go
index 7eb04198f..7b4745eb8 100644
--- a/pkg/bindings/containers/types_commit_options.go
+++ b/pkg/bindings/containers/types_commit_options.go
@@ -92,6 +92,21 @@ func (o *CommitOptions) GetPause() bool {
return *o.Pause
}
+// WithSquash set field Squash to given value
+func (o *CommitOptions) WithSquash(value bool) *CommitOptions {
+ o.Squash = &value
+ return o
+}
+
+// GetSquash returns value of field Squash
+func (o *CommitOptions) GetSquash() bool {
+ if o.Squash == nil {
+ var z bool
+ return z
+ }
+ return *o.Squash
+}
+
// WithRepo set field Repo to given value
func (o *CommitOptions) WithRepo(value string) *CommitOptions {
o.Repo = &value