GoogleContainerTools / GoogleContainerTools/skaffold

Docker client, `localDaemon`, triggers a containers prune when calling the `Delete` method

Open
#8,605 0 comments 0 reactions 0 assignees View on GitHub
deploy/docker kind/bug priority/p2
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

### Expected behavior
To not trigger the `ContainersPrune` over all the container.

### Actual behavior
When calling the docker `localDaemon.Delete` method, it triggers a `ContainersPrune` over all the stoped containers. If we use the method to delete a list of stopped containers, the first call will delete all of them, causing the other calls to fail, it doesn't find the other containers to delete.

The behaviour is in https://github.com/GoogleContainerTools/skaffold/blob/664890b7f96eb368c1865765f1609cb94f29555b/pkg/skaffold/docker/image.go#L202-L215

An idea is to use labels to filter the containers to prune.

### Information

- Skaffold version: v2.3.0
- Operating system: all
- Installed via: compiled from source code

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.