Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is location of images pulled from Docker Hub via Docker for Mac

*Note: I know about this question, however, it is related to Docker Toolbox and not to Docker Desktop for Mac and it seems that each tool uses different location for storing Docker images locally

Where can I find a docker images that have been pulled from Docker Hub by means of Docker desktop for Mac?

I tried to verify that Docker is running by the following command.

docker run hello-world

As a result the Docker daemon pulled the "hello-world" image from the Docker Hub but I am not able to find it.

like image 892
pgiecek Avatar asked Jul 17 '16 09:07

pgiecek


People also ask

Where are pulled Docker images stored Mac?

On a Mac, the default location for Docker images is ~/Library/Containers/com. docker. docker/Data/vms/0/. Note than on Windows and Mac, Docker runs Linux containers in a virtual environment.

Where are pulled Docker files stored?

The docker images, they are stored inside the docker directory: /var/lib/docker/ images are stored there.

How do I view pulled images on Docker?

The easiest way to list Docker images is to use the “docker images” with no arguments. When using this command, you will be presented with the complete list of Docker images on your system. Alternatively, you can use the “docker image” command with the “ls” argument.


1 Answers

It should be in

$HOME/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2

with Docker.qcow2 being the filesystem for the "vm" that Docker for Mac runs in.
See issue 23437.

That means removing the images (thread 15194: docker images -q |xargs docker rmi --force) won't decrease the space occupied by Docker.qcow2 (and the disk space on the disk).
To the point you start seeing aliases like this one:

shrink-qcow2 () {
     mv ${1} ${1}.BACKUP && qemu-img convert -O qcow2 ${1}.BACKUP ${1}
}
like image 135
VonC Avatar answered Nov 15 '22 03:11

VonC