查看默认docker文件系统引擎信息
[[email protected] ~]# docker info
Containers: 19
Running: 16
Paused: 0
Stopped: 3
Images: 18
Server Version: 1.12.6
Storage Driver: devicemapper #默认为devicemapper
停止docker服务
[[email protected] ~]# service docker stop
Redirecting to /bin/systemctl stop docker.service
将OverlayFS加到module目录下
echo "overlay" > /etc/modules-load.d/overlay.conf
reboot系统
确认overlay生效
[[email protected] ~]# lsmod |grep over
overlay 37831 0
配置Docker Daemon用OverlayFS启动
[[email protected] ~]# vi /etc/systemd/system/docker.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon --storage-driver=overlay
启动Docker daemon
[[email protected] ~]# systemctl daemon-reload
[[email protected] ~]# service docker start
Redirecting to /bin/systemctl start docker.service
查看修改后的文件系统引擎信息
[[email protected] ~]# docker info |grep overlay
Storage Driver: overlay
原文地址:https://blog.51cto.com/9103824/2387916
时间: 2024-09-28 07:45:43