DEV Community

IRPAN KUSUMA W
IRPAN KUSUMA W

Posted on

2 1

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)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay