From 2243b6020330ea06abdb594db9c6c8ff429cfc5d Mon Sep 17 00:00:00 2001 From: flouthoc Date: Sat, 26 Jun 2021 18:55:08 +0530 Subject: reset: remove external containers on podman system reset [NO TESTS NEEDED] Signed-off-by: flouthoc --- pkg/domain/infra/tunnel/containers.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkg/domain/infra/tunnel') diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go index 0047fc839..ccebfffa4 100644 --- a/pkg/domain/infra/tunnel/containers.go +++ b/pkg/domain/infra/tunnel/containers.go @@ -646,6 +646,12 @@ func (ic *ContainerEngine) ContainerList(ctx context.Context, opts entities.Cont return containers.List(ic.ClientCtx, options) } +func (ic *ContainerEngine) ContainerListExternal(ctx context.Context) ([]entities.ListContainer, error) { + options := new(containers.ListOptions).WithAll(true) + options.WithNamespace(true).WithSize(true).WithSync(true).WithExternal(true) + return containers.List(ic.ClientCtx, options) +} + func (ic *ContainerEngine) ContainerRun(ctx context.Context, opts entities.ContainerRunOptions) (*entities.ContainerRunReport, error) { con, err := containers.CreateWithSpec(ic.ClientCtx, opts.Spec, nil) if err != nil { -- cgit v1.2.3-54-g00ecf