1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| yum install -y yum-utils yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo yum makecache fast yum list docker-ce --showduplicates yum install -y docker-ce-18.09.9-3.el7 docker-ce-cli-18.09.9-3.el7 systemctl enable --now docker cat > /etc/docker/daemon.json <<EOF { "exec-opts": ["native.cgroupdriver=systemd"], "insecure-registries": ["192.168.1.138:5000"], "registry-mirrors": [ "https://3laho3y3.mirror.aliyuncs.com" ], "log-driver": "json-file", "log-opts": { "max-size": "100m" }, "storage-driver": "overlay2" } EOF systemctl restart docker # 测试 docker run hello-world
|