CentOS Docker 安装

Docker 要求 CentOS 系统的内核版本高于 3.10 ,查看本页面的前提条件来验证你的CentOS 版本是否支持 Docker 。通过 uname -r 命令查看你当前的内核版本

uname -r

安装一些必要的系统工具:

yum install -y yum-utils device-mapper-persistent-data lvm2

添加软件源信息:

yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

更新 yum 缓存:

yum makecache fast

安装 Docker-ce:

yum -y install docker-ce

启动 Docker 后台服务

systemctl start docker

测试运行 hello-world

docker run hello-world



镜像加速

cd /etc/docker

touch daemon.json

{  "registry-mirrors": ["http://hub-mirror.c.163.com"]}


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章