Centos7安装docker

    原本打算在centos6.9上面安装的,不过因为selinux-policy-targeted的版本不符合要求,也没法升级更高版本,无奈放弃,改成centos7安装。linux

    1)添加yum仓库docker

    添加/etc/yum.repos.d/docker.repo文件apache

[dockerrepo]
name=Docker Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/docker/yum/repo/centos7
enabled=1
gpgcheck=1
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/docker/yum/gpg

    这里用的国内清华大学提供的镜像服务,速度相对较快。centos

    添加后执行如下操做缓存

#升级全部包,改变软件设置和系统设置,系统版本内核都升级
yum update
#清除yum机制的本地缓存
yum clean all
#从新建立yum本地缓存
yum makecache

    2)安装docker包bash

yum install docker-engine

     3)安装完成后url

#启动
systemctl start docker.service
#配置docker开机自启动
systemctl enable docker.service
相关文章
相关标签/搜索