SACn
SACn

Reputation: 1924

Where pulled images of docker are stored in Windows?

Although docker info in windows display Docker Root Dir: /var/lib/docker, but there is no such folder */var/lib/docker *. Where to locate image files get pulled from docker pull hello-world etc. and how to change location of these folders ?

Upvotes: 1

Views: 3800

Answers (1)

Mario Cairone
Mario Cairone

Reputation: 1144

If you are running docker on windows using docker toolbox the directory /var/lib/docker refers to your virtual machine (boot2Docker).Connect to the machine:

docker-machine ssh <machine>

and type:

sudo ls /var/lib/docker 

to see the content.

You can change Docker's storage base directory (where container and images go) using the -g option when starting the Docker daemon.

Edit the file profile:

sudo vi /var/lib/boot2docker/profile

and add the -g option to the EXTRA_ARGS variable:

EXTRA_ARGS='
--label provider=virtualbox
-g <path>
'

save and restart the machine:

docker-machine restart <machine>

connect againt to your machine using ssh and verify the changes typing:

docker info

Hope this can help.

Upvotes: 2

Related Questions