DOCKER的安装

安装docekr

安装之前一些必要的系统工具

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

添加源信息

yum-config-manager --add-repo httpd://mirrora.aliyun.com/docker-ce/linux/centos/docker-ce.repo

更新yum缓存

yum -y install docker-ce

启动  docker 服务

systemctl start docker

设置开机自启

systemctl enable docker 

测试运行  hello-world

docker run hello-world

排查错误

tailf /var/log/message

或者 journalctl -udocker.service

或者docker info

对镜像的加速

vim /etc/docker/daemon.json

{

"registry-mirrors":

        ["https://hub-mirror.c.163.com",

          "https://reg-mirror.qiniu.com"

        ]

}


posted @ 2020-03-26 09:02  不一样的暖  阅读(101)  评论(0编辑  收藏  举报