Monday, September 10, 2018

How To Move Docker Images OS Files From Default To Different OS Location

Requirement:

    By default docker ce is installed on /var/lib/docker which may have limited space. As more and more images are coming and easy for moving images, we better put images on mounted Filesystem

Solution:

   Scope: it is tested on Docker 18.06.1-ce  on Linux

  • As root
  • systemctl stop docker
  • mv /var/lib/docker   /bigdisk/apps/docker
  • ln -s /bigdisk/apps/docker  /var/lib/docker
  • systemctl start docker
It will work fine after restart


No comments: