centos8.5安装docker
1、设置docker-ce配置文件
[root@localhost ~]# sudo vi /etc/yum.repos.d/docker-ce.repo
2、在docker-ce.repo 文件中添加以下内容:
[docker-ce] name=Docker CE Stable - $basearch baseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/8/$basearch/stable/ gpgcheck=1 gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg enabled=1
3、安装docker:
[root@localhost ~]# sudo dnf update [root@localhost ~]# sudo dnf install -y docker-ce docker-ce-cli containerd.io [root@localhost ~]# sudo systemctl start docker [root@localhost ~]# sudo systemctl enable docker [root@localhost ~]# docker --version
4、下载docker镜像
[root@localhost ~]# docker pull docker.cloudimages.asia/mysql:latest