From ec4060aef6c77c049fc2c3b6438ebb5590f6ab69 Mon Sep 17 00:00:00 2001 From: Sujil02 Date: Wed, 8 Apr 2020 04:49:32 -0400 Subject: Ability to prune container in api V2 Adds ability to prune containers for v2. Adds client side prompt with force flag and filters options to prune. Signed-off-by: Sujil02 --- pkg/domain/infra/tunnel/containers.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkg/domain/infra/tunnel') diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go index 05b62efcf..679bb371b 100644 --- a/pkg/domain/infra/tunnel/containers.go +++ b/pkg/domain/infra/tunnel/containers.go @@ -146,6 +146,10 @@ func (ic *ContainerEngine) ContainerRm(ctx context.Context, namesOrIds []string, return reports, nil } +func (ic *ContainerEngine) ContainerPrune(ctx context.Context, options entities.ContainerPruneOptions) (*entities.ContainerPruneReport, error) { + return containers.Prune(ic.ClientCxt, options.Filters) +} + func (ic *ContainerEngine) ContainerInspect(ctx context.Context, namesOrIds []string, options entities.InspectOptions) ([]*entities.ContainerInspectReport, error) { var ( reports []*entities.ContainerInspectReport -- cgit v1.2.3-54-g00ecf