docker 存储使用overlay
1、requirement 必须升级到7.2
centos 7.2
2、升级centos,安装docker
2.1 系统升级
sudo yum upgrade --assumeyes --tolerant sudo yum update --assumeyes
2.2 确认内核
uname -r 3.10.0-327.10.1.el7.x86_64
2.3 启用overlay
$ sudo tee /etc/modules-load.d/overlay.conf <<-‘EOF‘ overlay EOF
2.4 重启系统
reboot
2.5 确认 overlay启用
$ lsmod | grep overlay overlay
2.6 配置docker repo
$ sudo tee /etc/yum.repos.d/docker.repo <<-‘EOF‘ [dockerrepo] name=Docker Repository baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/ enabled=1 gpgcheck=1 gpgkey=https://yum.dockerproject.org/gpg EOF
2.7 配置docker 使用overlay
$ sudo mkdir -p /etc/systemd/system/docker.service.d && sudo tee /etc/systemd/system/docker.service.d/override.conf <<- EOF [Service] ExecStart= ExecStart=/usr/bin/docker daemon --storage-driver=overlay -H fd:// EOF
2.8 安装docker engine,daemon和service
sudo yum install --assumeyes --tolerant docker-engine-1.9.1 docker-engine-selinux-1.9.1 sudo systemctl start docker sudo systemctl enable docker
时间: 2024-11-09 12:35:21