您的位置:首页 > 运维架构 > Docker

CentOS7 安装docker

2016-08-29 16:23 267 查看

CentOS7 安装docker

1 检查CentOS版本,要求3.10以上

[root@#localhost ~]# uname -r
3.10.0-327.el7.x86_64


2 更新yum

[root@#localhost ~]# yum update


3 添加yum源

[root@#localhost ~]# tee /etc/yum.repos.d/docker.repo <<-'EOF'
> [dockerrepo]
> name=Docker Repository
> baseurl=https://yum.dockerproject.org/repo/main/centos/7/
> enabled=1
> gpgcheck=1
> gpgkey=https://yum.dockerproject.org/gpg
> EOF


4 安装 docker

[root@#localhost ~]# yum install docker-engine


5 启动 docker

[root@#localhost ~]# systemctl start docker


6 验证 docker 是否安装成功

[root@#localhost ~]# docker run hello-world
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  centos