Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are docker images stored by boot2docker?

Tags:

docker

I'm playing around with Docker on OS X (with boot2docker) and can't figure out where these images are being stored. I'm just curious.

This question answers it for Linux which is apparently in /var/lib/docker/graph/<id>/layer

I installed via Homebrew and poked around in /usr/local/Cellar/docker but it doesn't look like it's there. There's a boot2docker-vm.vmdk in ~/.boot2docker. Are the images actually stored in this VM?

CORRECT ANSWER BY CREACK BELOW.
THIS IS JUST SOME ELABORATION:

To get into the boot2docker VM:

boot2docker ssh

user: docker pass: tcuser

I had to sudo su to get access to the directory

And voilà, there are the images.

like image 224
kjs3 Avatar asked Apr 09 '14 15:04

kjs3


People also ask

Where does docker images get stored?

all these objects are store inside a directory in our local machine. By default, all the Docker objects are store in the following directory. The contents stored inside the /var/lib/docker path depend on the storage driver that you are using as well. Now let us first understand the docker storage drivers.

Where are docker images stored by default?

In a default installation, layers are stored in C:\ProgramData\docker and split across the "image" and "windowsfilter" directories. You can change where the layers are stored using the docker-root configuration, as demonstrated in the Docker Engine on Windows documentation.

How docker images are stored?

Docker uses storage drivers to store image layers, and to store data in the writable layer of a container. The container's writable layer does not persist after the container is deleted, but is suitable for storing ephemeral data that is generated at runtime.

Where does docker pull images from?

By default, docker pull pulls images from Docker Hub. It is also possible to manually specify the path of a registry to pull from. For example, if you have set up a local registry, you can specify its path to pull from it. A registry path is similar to a URL, but does not contain a protocol specifier ( https:// ).


1 Answers

Boot2docker is a Virtal Machine (via VirtualBox). So the images are stored within the virtualbox image (the vmdk file). Once mounter by VirtualBox, it is linux and the images are stored at the place you stated.

like image 78
creack Avatar answered Oct 04 '22 21:10

creack