Docker - Limpar sistema removendo itens não usados
Antes de tudo, analisar os tamanhos e usos:
docker system df
docker image ls
docker volume ls
docker ps
Limpar sistema:
docker system prune -a --filter label!=do-not-remove
Link: https://docs.docker.com/engine/reference/commandline/system_prune/
--
... E depois, para os malditos usuários do windows ...
Pare o Docker e vá no Power Shell pra diminuiur a VHDX, no Modo Administrador e execute:
Optimize-VHD -Path "C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\MobyLinuxVM.vhdx" -Mode Quick
(o nome do VHDX pode ter mudado, como por exemplo,DockerDesktop.vhdx
)
Here is an English Translation:
Docker - Clean up system by removing unused items
First of all, analyze the sizes and uses:
docker system df
docker image ls
docker volume ls
docker ps
Clear system:
docker system prune -a --filter label!=do-not-remove
Link: https://docs.docker.com/engine/reference/commandline/system_prune/
--
...
And then for the damn windows users ...
Stop Docker and go to Power Shell to slow down VHDX in Administrator Mode and run:
Optimize-VHD -Path "C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\MobyLinuxVM.vhdx" -Mode Quick (VHDX name may have changed, such as DockerDesktop.vhdx)