Skip to content

Commit

Permalink
added filter "dangling" = false to image prune
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddayag committed Feb 27, 2023
1 parent 0a9db6d commit e9d46ef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion strelets/adapter/prune_unused_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ func (d *dockerSwarmOrchestrator) PruneUnusedResources(ctx context.Context) erro
}
fmt.Printf("pruned docker networks: %v\n", len(networksPrune.NetworksDeleted))

imagePrune, err := client.ImagesPrune(ctx, filters.Args{})
args := filters.NewArgs()
args.Add("dangling", "false")

imagePrune, err := client.ImagesPrune(ctx, args)
if err != nil {
return err
}
Expand Down

0 comments on commit e9d46ef

Please sign in to comment.