MCPcopy Index your code
hub / github.com/coder/envbox / PruneImages

Function PruneImages

dockerutil/image.go:128–137  ·  view source on GitHub ↗

PruneImage runs a simple 'docker prune'.

(ctx context.Context, client Client)

Source from the content-addressed store, hash-verified

126
127// PruneImage runs a simple 'docker prune'.
128func PruneImages(ctx context.Context, client Client) (image.PruneReport, error) {
129 report, err := client.ImagesPrune(ctx,
130 filters.NewArgs(filters.Arg("dangling", "false")),
131 )
132 if err != nil {
133 return image.PruneReport{}, xerrors.Errorf("images prune: %w", err)
134 }
135
136 return report, nil
137}
138
139func processImagePullEvents(r io.Reader, fn ImagePullProgressFn) error {
140 if fn == nil {

Callers 2

runDockerCVMFunction · 0.92
PullImageFunction · 0.85

Calls 2

ImagesPruneMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected