4

docker pull image_name

downloads the image to the default location. What if i want to download the same image to different location of my wish..!? what option i need to use while executing docker pull.

Regards, Rohith

Rohith
  • 1,077
  • 5
  • 16
  • 36

1 Answers1

2

There aren't any options on the docker pull command to change the download location.

You can configure the storage location on the docker daemon itself (according to How to change the docker image installation directory?).

By default images will be stored in /var/lib/docker/aufs/diff/<id> in most cases (according to Where are Docker images stored on the host machine?).

Rach Sharp
  • 2,324
  • 14
  • 31
  • atleast do we have an option to rename the image while pulling itself - my intention was to download the same image which is already present., and measure the time taken to download the new image from the repository. – Rohith Feb 19 '18 at 11:49
  • I don't think so, you can see the `docker pull` docs here: https://docs.docker.com/engine/reference/commandline/pull/. You could remove the download of the image with `docker image rm` (https://docs.docker.com/engine/reference/commandline/image_rm/) and redo it while timing. – Rach Sharp Feb 19 '18 at 11:51
  • from the first link: set it in `/etc/docker/daemon.json` `"data-root": "/media/user/disk/docker"` – alchemy Aug 08 '23 at 20:03