We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
systemctl stop docker vi /lib/systemd/system/docker.service # 找到 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock # 修改成 ExecStart=/usr/bin/dockerd -H fd:// -g /new/path/docker --containerd=/run/containerd/containerd.sock mv /var/lib/docker /new/path/docker systemctl daemon-reload systemctl start docker
参考:
https://linuxconfig.org/how-to-move-docker-s-default-var-lib-docker-to-another-directory-on-ubuntu-debian-linux
The text was updated successfully, but these errors were encountered:
更新docker后,/lib/systemd/system/docker.service 会恢复成默认,需要重新设置。
/lib/systemd/system/docker.service
另一种思路:将/var/lib/docker目录软连到/new/path/docker
/var/lib/docker
/new/path/docker
Sorry, something went wrong.
No branches or pull requests
参考:
The text was updated successfully, but these errors were encountered: