Docker is a useful container but by default all docker’s stuff will place in /var/lib/docker
in many case this will share with root disk space. For easy to maintain disk space we just change docker’s directory to separate disk or path.
Install docker
wget https://get.docker.com -O- | bash -
Edit /etc/docker/daemon.json
{ ... "graph":"/path/to/target" ... }
Stop dockerd
service docker stop
Move old docker data
rsync -aP /var/lib/docker/* /path/to/target/
Start dockerd
service docker start
Latest posts by Kawin Viriyaprasopsook (see all)
- Convert flac audio to opus/ogg/mp3 - 2020-12-20
- Fix systemd resolved not working (127.0.0.53) - 2019-09-23
- Safely remove SATA disk from a running Linux system - 2019-05-24