summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-22 06:24:52 -0400
committerGitHub <noreply@github.com>2022-04-22 06:24:52 -0400
commit26a51b29009e6250f2b52fc7c13fb1b65208754e (patch)
tree5fd96d95e5a134783d264b05db8efa86bdd59267 /pkg
parent67a1b520e38d9860345bdece2026c4f7a95cb8fd (diff)
parent5375401960cf0a9b716bb18eacdb07ffbb0e6da1 (diff)
downloadpodman-26a51b29009e6250f2b52fc7c13fb1b65208754e.tar.gz
podman-26a51b29009e6250f2b52fc7c13fb1b65208754e.tar.bz2
podman-26a51b29009e6250f2b52fc7c13fb1b65208754e.zip
Merge pull request #13943 from cdoern/clone
podman container clone -f
Diffstat (limited to 'pkg')
-rw-r--r--pkg/domain/entities/containers.go1
-rw-r--r--pkg/domain/infra/abi/containers.go2
2 files changed, 2 insertions, 1 deletions
diff --git a/pkg/domain/entities/containers.go b/pkg/domain/entities/containers.go
index 3d1d7a6d2..ae60e5b96 100644
--- a/pkg/domain/entities/containers.go
+++ b/pkg/domain/entities/containers.go
@@ -477,4 +477,5 @@ type ContainerCloneOptions struct {
Image string
RawImageName string
Run bool
+ Force bool
}
diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go
index 46ef01b80..b56c36015 100644
--- a/pkg/domain/infra/abi/containers.go
+++ b/pkg/domain/infra/abi/containers.go
@@ -1630,7 +1630,7 @@ func (ic *ContainerEngine) ContainerClone(ctx context.Context, ctrCloneOpts enti
if ctrCloneOpts.Destroy {
var time *uint
- err := ic.Libpod.RemoveContainer(context.Background(), c, false, false, time)
+ err = ic.Libpod.RemoveContainer(context.Background(), c, ctrCloneOpts.Force, false, time)
if err != nil {
return nil, err
}