美文网首页
【docker】3.CentOS7中docker安装

【docker】3.CentOS7中docker安装

作者: 小王爱写BUG | 来源:发表于2020-07-01 10:44 被阅读0次

安装docker

#1.查看CentOS版本
cat /etc/redhat-release
#2.查询内核版本,docker要求CentOS 系统的内核版本高于 3.10
uname -r
centos_v.jpg
#3.设置阿里云源
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
#4.安装docker
yum install docker -y
#5.启动并加入开机启动
systemctl start docker
systemctl enable docker
#6查看docker版本
docker version
# 错误:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
# 镜像加速 
vi /etc/docker/daemon.json
{"registry-mirrors":["https://reg-mirror.qiniu.com/"]}
# 加载文件,重启docker
systemctl daemon-reload
systemctl restart docker.service
docker_v.jpg

下载自己需要的镜像:

docker pull java:8
docker pull redis:latest
docker pull rabbitmq:3-management

相关文章

网友评论

      本文标题:【docker】3.CentOS7中docker安装

      本文链接:https://www.haomeiwen.com/subject/kfecqktx.html