I am using Docker for a test environment inside a VirtualBox virtual machine on Windows. Having the MongoDB container run out of disk space would not be a problem if removing and recreating the container fixed the problem, but this is not the case. How can I get this space back? Right now I'm destroying the VirtualBox VM and rebuilding it to recover, but this is long and painful. Thanks for your attention.
Simply remove unneeded images by first having a look of which images are there with
docker ps -a
and remove unneeded ones with
docker rmi imageid|name
Keep in mind though that images depend on each other - you have to find out which are the ones you really want to remove. The good news is that unneeded dependencies are automatically removed.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.