Centos7 修改docker文件系統引擎為overlayfs
阿新 • • 發佈:2019-04-30
rri 查看 system inf pre ecs pause container version 查看默認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
Centos7 修改docker文件系統引擎為overlayfs