summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorcdoern <cbdoer23@g.holycross.edu>2022-04-20 21:40:47 -0400
committercdoern <cbdoer23@g.holycross.edu>2022-04-21 15:00:32 -0400
commit5375401960cf0a9b716bb18eacdb07ffbb0e6da1 (patch)
treeb35639c169b65c5e5d44ccfa3e9e75fe8aa4f47f /pkg/domain
parent02ab86a68aa3c510dc8be8aefbd1029efb657438 (diff)
downloadpodman-5375401960cf0a9b716bb18eacdb07ffbb0e6da1.tar.gz
podman-5375401960cf0a9b716bb18eacdb07ffbb0e6da1.tar.bz2
podman-5375401960cf0a9b716bb18eacdb07ffbb0e6da1.zip
podman container clone -f
add the option -f to force remove the parent container if --destory is specified resolves #13917 Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
Diffstat (limited to 'pkg/domain')
-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 072514d0f..99b000c2c 100644
--- a/pkg/domain/entities/containers.go
+++ b/pkg/domain/entities/containers.go
@@ -475,4 +475,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 100842c69..db58569c5 100644
--- a/pkg/domain/infra/abi/containers.go
+++ b/pkg/domain/infra/abi/containers.go
@@ -1589,7 +1589,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
}