1

I know dockerhub is the best place to store docker images. But is it possible to also store the docker images on disk to a specific folder in particular Dropbox.

When I do docker images for instance, I see the list of images but not "where" they are stored on my hard-drive.

blahblah@multivac:~] 16s % docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
blahblah/ubuntu      customized          08081314feb5        49 minutes ago      4.87 GB
ubuntu              latest              08081314feb5        49 minutes ago      4.87 GB
ubuntu              <none>              93fd78260bd1        12 days ago         86.2 MB

This can be helpful, in the event of loss of the laptop or sudden damage.

1 Answer 1

0

Docker images are saved under /var/lib/docker. To be more specific, an image comprises of multiple layers and each layer is saved under /var/lib/docker/<storage-driver>/layers/.

In case of Mac, things get a bit more complicated because in Docker for Mac actually runs a thin VM and the contents of the VM are stored in $HOME/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2.

You can connect to the Linux VM tty by typing screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty and from there navigating to the above directories, you will see the result.

Image size can add up quite quickly, I'd recommend not storing on Dropbox - instead use a managed Docker repository such as aforementioned Docker Hub or Quay or even AWS ECR.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .