Docker学习系列: 1.Centos上安装Docker

Docker支持Centos6及以后版本

对于centos6可以使用epel库安装,命令如下:

    sudo yum install http://mirrors.yun-idc.com/epel/6/i386/epel-release-6-8.noarch.rpm

    sudo yum install -y docker-io

对于centos7,由于centos-extras源中以及内置docker,可以直接使用yum安装:

    sudo yum install -y docker

错误解决

错误一

提示:

Segmentation Fault or Critical Error encountered. Dumping core and aborting.
Aborted

解答:安装错误安装docker了,应该安装docker-io


错误二

提示:

Transaction Check Error:
  file /usr/bin/docker from install of docker-io-1.7.1-2.el6.x86_64 conflicts with file from package docker-1.5-5.el6.x86_64
Error Summary

解答:这个是因为先装了docker,再装docker-io后的结果,解决方法是yum remove docker后再yum install docker-io即可。


安装成功:

[root@iZj6ccp3jft7zgyvxmv2peZ ~]# docker version
Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d/1.7.1
OS/Arch (client): linux/amd64
Get http:///var/run/docker.sock/v1.19/version: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?


©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页