ubuntu安装docker 修改默认存储路径
发布网友
发布时间:2022-10-18 03:43
我来回答
共1个回答
热心网友
时间:2023-11-06 18:45
ubuntu安装docker 修改默认存储路径
Ubuntu18.04.5:
1.验证
$ sudo docker -v
2.修改docker.service配置文件,使用--graph 参数指定新的目录
MAINPID
3.重新加载配置文件
$ sudo systemctl daemon-reload
4.启动docker,查看docker状态
sudo systemctl enable docker
$ sudo systemctl status docker
5.查看默认路径是否修改成功
$ sudo docker info
...
Kernel Version: 5.4.0-42-generic
Operating System: Ubuntu 18.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.914GiB
Name: lmmx-virtual-machine
ID: Y7A6:E2RI:45GA:7ZLX:XDV7:2UL7:UFX4:E5SK:3VY6:2FGC:GMYS:CKE2
Docker Root Dir: /opt/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false