After a fresh install of my operating system and after coping over my Docker backup, I discovered that there was a gigantic file called
Docker.raw which stores all of the containers, images, and volumes somehow magically. In my case, it was a whopping
86+ GB! 😳 Sure storage is relatively cheap, but that’s just needlessly wasteful and this is my laptop so it’s a bit ridiculous. I believe now that this was a result of working with Docker from an old version and that this problem may have been solved, but at least regarding Docker for Mac, the raw file can not be shrunken while retaining the data. This means that if you wanted to keep all your Docker resources, you would first have to get any data out of your volumes that you want to keep before you can get rid of it.
While attempting to figure out how I was going to get the data out of my volumes. I was lurking around my Docker setup when I noticed that I had a lot of extra volumes. I didn’t know if the data inside was important or not and so I wanted to find out more about them in order to see if the data needed to be properly backed up. Upon searching the web, I couldn’t really find much documentation around viewing volumes and getting data out of them for backing up and restoring between machine migrations. I’m going to share this in the hopes it helps someone else since I wasn’t able to find anything online when I looked.