默认安装的centos-mini版本很多东西都没有.比如docker的源就没有.而docker在centos-extras包,mini是没有的.
安装之前先执行
yum search docker
如果提示没有则添加epel
yum -y install epel-release
官方标准的说法是:
The
centos-extras
repository must be enabled. This repository is enabled by default, but if you have disabled it, you need to re-enable it.
官方地址:
https://docs.docker.com/engine/installation/linux/docker-ce/centos/#install-using-the-repository
接下来
yum -y install docker-io