DEV Community

IRPAN KUSUMA W
IRPAN KUSUMA W

Posted on

How to rsync docker images path to some-path

Halo sobat,

Now i want to tell you something about symlink on linux when your docker path storage have full capacity. Here script for execute this

  • Stop docker service
systemctl stop docker
Enter fullscreen mode Exit fullscreen mode
  • Symlink your docker path to some-path
sudo rsync  -aP /var/lib/docker /new/path/folder
Enter fullscreen mode Exit fullscreen mode
  • Update your file daemon.json
vi /etc/docker/daemon.json

#add this line on daemon.json
{
  "data-root": "/new/path/folder"
}
Enter fullscreen mode Exit fullscreen mode
  • Start all docker image
docker start $(docker ps -a -q)
Enter fullscreen mode Exit fullscreen mode
  • Start docker service
systemctl start docker
Enter fullscreen mode Exit fullscreen mode

Top comments (0)