快速安装Docker服务

yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum makecache fast
yum list docker-ce --showduplicates | sort -r

yum install docker-ce-26.1.4-1.el7 docker-ce-cli-26.1.4-1.el7 containerd.io
yum install -y docker-compose
yum install java-1.8.0-openjdk.x86_64

添加容器加速仓库

vi /etc/docker/daemon.json

{
"registry-mirrors": ["https://yyyynnnnbmg.mirror.aliyuncs.com"],  //阿里云账号下的容器加速地址

}

 

systemctl daemon-reload
systemctl restart docker

systemctl enable docker

posted @ 2024-06-24 19:41  walkersss  阅读(26)  评论(0编辑  收藏  举报