Docker支持CentOS6及以后的版本。 对于CentOS6系统可以使用EPEL库安装docker,命令如下:
sudo su yum install -y http://mirrors.yun-idc.com/epel/6/i386/epel-release-6-8.noarch.rpm yum install -y docker-io
然而运行以上代码后,使用docker命令(如 docker images)仍会报错如下:
Get http:///var/run/docker.sock/v1.19/images/json: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
解决方法为: 根据系统服务管理不同(centos6是upstart),运行以下命令,可以创建@H_301_9@/var/run/docker:
systemd: sudo systemctl start docker upstart: sudo service docker start init.d: sudo /etc/init.d/docker start
同时这些命令也可以解决如下报错:
FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host?原文链接:https://www.f2er.com/centos/379958.html