本文共 983 字,大约阅读时间需要 3 分钟。
本篇博客其实是将docker官网的安装步骤办了过来。其中只涉及到了基本的安装方式和选项,如果想要看更多的docker安装的细节,可以看docker的文档官网。
环境介绍
一个纯净的centos7环境
为了方便我接下来安装docker的步骤会在shell连接工具中执行。
$ sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine
$ sudo yum install -y yum-utils$ sudo yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo
$ sudo yum install docker-ce docker-ce-cli containerd.io
$ sudo systemctl start docker
$ sudo docker run hello-world
运行结果
如果能看到下面情形说明docker安装成功。其实一般情况下安装步骤到第三步时就算安装成功了。第四步是用于启动docker服务,第五步是安装一个docker实例进行测试。
转载地址:http://kxgwi.baihongyu.com/