Centos安装Docker最新版

官方文档:

https://store.docker.com/editions/community/docker-ce-server-centos?tab=description

1. 前置条件
必须是CENTOS7,64位
2. 安装源

安装必要工具集

sudo yum install -y yum-utils

安装docker官方源

sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo

更新yum缓存

sudo yum makecache fast
3. 安装Dcoker
sudo yum -y install docker-ce
4. 启动Docker
sudo systemctl start docker
5. 测试Docker
sudo docker run hello-world

Leave a Reply

Your email address will not be published. Required fields are marked *