多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
**1. 配置 Docker yum 源【所有节点】** ```shell (1)安装必要的一些系统工具 # yum install -y yum-utils device-mapper-persistent-data lvm2 (2)添加软件源信息 # yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo (3) # sed -i 's+download.docker.com+mirrors.aliyun.com/docker-ce+' /etc/yum.repos.d/docker-ce.repo (4)更新 # yum makecache fast ``` **** 参考文档:[https://developer.aliyun.com/mirror/docker-ce/?spm=a2c6h.25603864.0.0.6bff25b4m18JkV](https://developer.aliyun.com/mirror/docker-ce/?spm=a2c6h.25603864.0.0.6bff25b4m18JkV) <br/> **2. 安装 Docker【所有节点】** ```shell (1)移除已经安装的docker # yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ docker-engine (2)安装docker # yum install -y docker-ce docker-ce-cli docker-compose-plugin (3)查看 docker 版本 # docker --version (4)docker 开机自启 # systemctl enable docker (5)启动 docker # systemctl start docker (6)查看 docker 状态 # systemctl status docker ● docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled) Active: active (running)【running表示已经启动成功】 ``` <br/> **3. 配置 docker 镜像源【所有节点】** ```shell (1)配置 Docker 镜像源 # cat >> /etc/docker/daemon.json<<EOF { "registry-mirrors": ["https://b9pmyelo.mirror.aliyuncs.com"] } EOF (2)重启 Docker # systemctl restart docker (3)查看 docker 状态 # systemctl status docker ● docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled) Active: active (running)【running表示启动成功】 ```