简体   繁体   中英

Getting docker daemon not running error

I am trying to get docker working on my sys However, not able to

Steps to reproduce the issue that I am facing:

  1. Installed EPEL on 6.5 RHEL
  2. Installed docker-io
  3. Able to run "docker" command
  4. When running "docker run -i -t fedora /bin/bash" command using without root, getting below error:

    FATA[0000] Post http:///var/run/docker.sock/v1.17/containers/create : dial unix /var/run/docker.sock http:///var/run/docker.sock/v1.17/containers/create:%20dial%20unix%20/var/run/docker.sock : permission denied. Are you trying to connect to a TLS-enabled daemon without TLS?

However, with root getting diff error like below for the same command:

FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host? 

A RHEL 6.5 , also termed Update 5, is from 21 November 2013 and comes with kernel 2.6.32-431 .

That seems quite an old kernel for docker to be installed and run successfully. Docker would need ideally a 3.10+ kernel.
Although Adrian Mouat mentions in the comments that the Red Hat Enterprise Linux 6.5 (64-bit) or later is supported

You will need 64 bit RHEL 6.5 or later, with a RHEL 6 kernel version 2.6.32-431 or higher as this has specific kernel fixes to allow Docker to work.

So make sure the docker daemon is started:

sudo service docker start

Then try some sudo docker commands:

sudo docker run -i -t fedora /bin/bash

The doc mentions:

If you get a Cannot start container error mentioning SELinux or permission denied , you may need to update the SELinux policies.
This can be done using sudo yum upgrade selinux-policy and then rebooting.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM