feat: remove old containers

This commit is contained in:
kolaente 2021-12-05 13:40:53 +01:00
parent 6929a86485
commit 2a477f49a2
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 3 deletions

View File

@ -21,6 +21,10 @@ func storeContainers(c *client.Client, containers []types.Container) {
lock.Lock()
defer lock.Unlock()
for _, container := range containers {
delete(store, container.ID)
}
for _, container := range containers {
if container.State != "running" {
continue
@ -40,7 +44,4 @@ func storeContainers(c *client.Client, containers []types.Container) {
store[container.ID] = dumper
}
// TODO: remove old containers
}