dockerdocker-registrydockerhubdocker-containerdocker-image

Where does docker images pulled from registry gets stored locally?


Where does docker images pulled from registry gets stored locally?

Can the local storage of docker images pulled from hub be changed?

And when we run an instance of image, where is that container located/copied/ or running from?


Solution

  • Related to the question “Can the local storage of docker images pulled from hub be changed?” To relocate default docker's directory (/var/lib/docker) to another place without modification, consider using rsync command in linux terminal to avoid inconsistences,i.e.

    $ sudo rsync -aqxP /var/lib/docker/ /new/path/docker
    

    ref: https://linuxconfig.org/how-to-move-docker-s-default-var-lib-docker-to-another-directory-on-ubuntu-debian-linux