0

I am new to Docker world. Installed Docker on centOS-7 and contineously facing the below error. I installed docker-composed with the following commands

I did everthing mentioned here: Cannot connect to the Docker daemon. Is the docker daemon running on this host?, but it did not work for me having CentOs box.

sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Nect step

sudo chmod +x /usr/local/bin/docker-compose

Next Step

sudo groupadd docker
sudo gpasswd -a $USER docker
sudo usermod -aG docker $USER
sudo usermod -aG docker $(whoami)
sudo systemctl enable docker.service

Now when I performed the very last command, centOS machine got hang even after rebbot VM is not getting up. I can't ping to that machine.

I've posted each logs of step-

[user@vannila ~]$ sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
[sudo] password for dc-user:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   617    0   617    0     0   1527      0 --:--:-- --:--:-- --:--:--  1531
100 11.2M  100 11.2M    0     0  1388k      0  0:00:08  0:00:08 --:--:-- 1822k
[user@vannila ~]$ sudo chmod +x /usr/local/bin/docker-compose
[user@vannila ~]$ sudo groupadd docker
groupadd: group 'docker' already exists
[user@vannila ~]$ sudo gpasswd -a $USER docker
Adding user dc-user to group docker
[user@vannila ~]$ sudo usermod -aG docker $USER
[user@vannila ~]$ sudo service docker status
Redirecting to /bin/systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: https://docs.docker.com
[user@vannila ~]$ sudo usermod -aG docker $(whoami)
[user@vannila ~]$ sudo systemctl enable docker.service
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
[user@vannila ~]$ sudo systemctl start docker.service 

Let me know if you need any other details.

PAA
  • 1
  • 46
  • 174
  • 282
  • Do you have SELinux enabled on this machine? Regardless, you may need `container-selinux`. Also, did you install `Docker` itself prior to the `docker-compose`? In any event, I think you will need to boot into single user mode from grub by editing the boot, and you can then disable the docker.service. After a reboot, you can look at log files. As this question stands, without some log files, I'm not sure how we can help. – KevinO Nov 17 '18 at 06:28
  • 1
    *"Let me know if you need any other details."* - Does this have *anything* to do Java? – Stephen C Nov 17 '18 at 07:26
  • @ KevinO - I did not quite followed you. Could you please let me know what exact I need to check ? Linux commands would help me. – PAA Nov 17 '18 at 07:30

0 Answers0