patti_jane
patti_jane

Reputation: 3841

Docker-Toolbox storage on Windows

I'm quite new to Docker, and I realized for each build & run, nearly 15GB of my disk space disappeared.

I have used the following commands but they didn't help freeing up space:

$ docker system prune
$ docker container prune
$ docker image prune
$ docker volume prune
$ docker network prune

I then tried to check where my root directory is, which is: /mnt/sda1/var/lib/docker but I have no idea where such directory is in Windows.

I also checked C:\Users\<username>\.docker directory, but there doesn't seem any files stored here.

There is also no Docker related folder under these directories as well , C:\Users\Public\Documents and C:\ProgramData

Edit: Using WinDirStat tool, I found out that the file that takes too much space is disk.vmdk which is under C:\Users\<username>\.docker\machine\machines\default.

I tried to change its location to D: via updating default.vbox file under C:\Users\<username>\.docker\machine\machines\default\default, but it does not work.

Upvotes: 1

Views: 991

Answers (2)

Taha Mahjoubi
Taha Mahjoubi

Reputation: 402

You can try to delete the current docker environment and then setting it back again. However this will destroy all your current images :

1- delete the current docker environment :

docker-machine rm -f default

2- create a new docker environment:

docker-machine create -d virtualbox --virtualbox-disk-size "80000" default

3- set then correct environment variables :

docker-machine env default

Hope it helps !

Credits goes to this articles which helped me figure it out : https://medium.com/@narven/docker-no-space-left-on-device-5c2276e4d61a

Upvotes: 1

Esteban Garcia
Esteban Garcia

Reputation: 2263

prune commands without --all will only remove dangling resources. If you want to fully remove everything docker-related (volumes, network, containers, images) except for running containers and their respective images do:

docker system prune --all

Also, docker-toolbox runs inside a VM the folder you are looking for /mnt/sda1/var/lib/docker is not in your windows machine but the linux VM.

Check here how to SSH to that VM.

Upvotes: 0

Related Questions