How can I change the root directory for Docker in OpenWrt?
To change the root directory of Docker, you need to follow these steps:
- Access the command line interface of OpenWrt.
- Update the package list using the opkg update command.
- Install Docker using the command “opkg install docker”.
- Use the command ‘uci set docker.dockerd.data_root=/path/to/new/root’ to replace ‘/path/to/new/root’ with the path where you want to set the Docker root directory.
- Execute the command “uci commit docker” to save the changes.
- Restart the Docker service by executing the command “sudo /etc/init.d/docker restart”.
Once the above steps are completed, the root directory of Docker will be changed to the specified path. Make sure you have enough storage space and create the corresponding directory in the new path.