Docker(yum安装)

Docker(yum安装)

联网的情况下 yum install -y yum

官网安装参考手册:https://docs.docker.com/install/linux/docker-ce/centos/

我们现在是在Linu下执行,一定要联网 ,yum 在线安装!

1、检测CentOS 7

[root@kuangshen bin]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)

2、安装我们的准备环境

yum -y install 包名 # yum install 安装命令 -y 所有的提示都为 y
yum -y install gcc
yum -y install gcc-c++
 1.卸载旧版本
 yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine
2.需要的安装包
yum install -y yum-utils
3.设置镜像的仓库
yum-config-manager \
    --add-repo \
    http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo  
4.更新yum软件包索引
yum makecache fast
5.安装
yum install docker-ce docker-ce-cli containerd.io
6.启动
systemctl start docker
7. 运行 hello-world
docker run hello-world
posted @ 2021-08-18 17:11  saxon宋  阅读(581)  评论(0)    收藏  举报