Location of docker images downloaded by Docker (1.9.1) on Mac OS X

For someone who is using Docker toolbox (that uses docker-machine), the answers concerning boot2docker on Mac OS X is not valid. The docker-machine VM is called "default" and it exists in /Users/<username>/.docker/machine/machines/default/ directory.

Note: I have also added this answer to this question: Where are Docker images stored on the host machine? but I am answering here as well so that it's easier to find the answer for someone specifically looking for Mac OS X and new version of Docker.


And if you are using Docker for Mac then the location is again different, namely:

/Users/MyUserName/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2

The docker images are stored in a different location on the Mac with Docker Desktop, different to where they are stored on other Linux systems.

Extract from Docker documentation (retrieved 25 March 2020 from https://docs.docker.com/docker-for-mac/space/ )

Docker Desktop stores Linux containers and images in a single, large “disk image” file in the Mac filesystem. This is different from Docker on Linux, which usually stores containers and images in the /var/lib/docker directory.

On my Mac with MacOS 10.14.6 Mojave, running Docker version 19.03.8 that single large file can be found at:

~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw

The Disk image location can also be seen (as mentioned in the docs) by selecting Preferences->Advanced menu from the Docker toolbar icon (works in Docker-CE v17):

Docker->Preferences->Advanced

Update: As mentioned by @udondan Docker now has a separate 'Disk' tab in Preferences where it shows the disk image location:

Docker->Preferences->Disk

Tags:

Docker

Macos