How to rsync docker images path to some-path

irpankusuma

IRPAN KUSUMA W

Posted on March 11, 2022

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
💖 💪 🙅 🚩
irpankusuma
IRPAN KUSUMA W

Posted on March 11, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related