Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker how to clean partial failed downloads for images?

I am using docker toolbox in OS X. When I run docker-compose pull and the network cuts out, the download does not resume after I fix the issue. Is there a way to purge or invalidate partial downloads for docker images?

like image 527
Derek Blair Avatar asked Dec 20 '15 13:12

Derek Blair


People also ask

How do I remove intermediate docker images?

You can use docker image prune -f after building images. This command will remove any untagged docker images from your machine.

How do you clean unused docker volumes?

To clean this up, you can use the docker container prune command. By default, you are prompted to continue. To bypass the prompt, use the -f or --force flag. Other filtering expressions are available.


1 Answers

As noted in the comments, incomplete images would not be present anyway.

Since PR 18353 and docs-v1.11.2-2016-06-10, the next pull would reload missing/incommplete layers and build the complete image.

  • For purging images (dangling or not used): docker image prune -a
  • For purging containers: docker container prune

See more here.

like image 153
VonC Avatar answered Oct 15 '22 09:10

VonC