Centos安装docker-ce
Docker-ce官网:https://docs.docker.com/install/linux/docker-ce/centos/
工具:
yum-utils、device-mapper-persistent-data、lvm2:
yum-utils提供了yum-config-manager 效用
device-mapper-persistent-data和lvm2有需要的 devicemapper存储驱动程序
$ sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
repo仓库配置:
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
安装:
sudo yum install docker-ce
设置国内镜像仓库:
# vim /etc/docker/daemon.json
{
"registry-mirrors": [" https://registry.docker-cn.com"]
}
可配置其他比如,daocloud,网易的等
重启:
systemctl restart docker