快速安裝Docker服務

walkersss發表於2024-06-24

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

相關文章