[SOLVED] Docker on -Current error: "Is docker daemon running?"
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I added a docker group and added my user to the docker group.
I added the docker start and stop scripts to /etc/rc.d/
I uninstalled all the dependencies, except libseccomp, because I couldn't figure out where to get it and it didn't seem to be causing any problems. After uninstalling everything, I used "su -" to run sbopkg. First, I installed google-go and then exited sbopkg and su. Then I used "su -" again and went back to sbopkg and installed the other dependencies. I also installed docker-cli, which seems optional for using docker(?). I logged out of everything and logged back in. Then as regular user:
Code:
user@computer:~$ docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.
and I get no response. So it looks like I need to set that up. The docs read like I set that up in .bashrc, but I don't know what's supposed to be done to set up the DOCKER_HOST or how to update .bashrc to reflect it.
It seems that docker authors assume a linux distro with systemd, they say to start docker with systemctl and I believe that's a systemd command? So, I don't know if the "env ..." command I just mentioned even works.
No, I did not. I don't know what I'm supposed to do. Do you mean
Code:
chmod +x /etc/rc.d/rc.docker
./etc/rc.d/rc.docker
?
Or
Code:
docker_start()
docker run hello-world
?
I just tried both of those and neither of them worked. I don't know anything about using start and stop scripts and I've only used docker a few times on Windows, so I'm used to service just starting in the background.
I think you did not actually start the docker daemon.
In your "/etc/rc.d/rc.local" script you should have these lines:
Code:
# Start the docker daemon:
if [ -x /etc/rc.d/rc.docker ]; then
/etc/rc.d/rc.docker start
fi
That way. docker daemon will start on every boot of the computer.
If you did not reboot after installing the docker packages plus its dependencies, you can run the command as root in a terminal or console:
Code:
/etc/rc.d/rc.docker start
The libseccomp package is part of Slackware-current and that is why you could no longer find it in the SBo repository for -current. I assume since you use sbopkg that you configured it to use Ponce's git repository.
And docker-cli is the docker commandline program which used to be part of the docker package but in recent releases, it was split off and now it needs its own package.
I am running docker on Slackware-current for a while without problems. Granted, I am using older versions of those SBo packages that what you can get from the repository now.
Thanks, Windu! That did it. I did update the rc.local script, but like I said, I don't know how these scripts work. However, I did reboot after the install and the daemon did not start with the reboot. Is there something else I need to do with the rc.local or another script to get it start when I reboot again, or will it just keep starting now that it's been started up once?
Thanks, Windu! That did it. I did update the rc.local script, but like I said, I don't know how these scripts work. However, I did reboot after the install and the daemon did not start with the reboot. Is there something else I need to do with the rc.local or another script to get it start when I reboot again, or will it just keep starting now that it's been started up once?
Thank you also, willysr.
Did you do:
Code:
chmod +x /etc/rc.d/rc.docker
?
The "if" line that you added to /etc/rc.d/rc.local checks to see if the file /etc/rc.d/rc.docker has the "executable" bit set. If so, it runs "/etc/rc.d/rc.docker start". If not, it doesn't.
One way to check is to do
Code:
ls -l /etc/rc.d/rc.docker
If you see "-rwxr-xr-x" at the beginning then the executable bit is set. If you see "-rw-r--r--" then it is not.
Yes, I did, drumz. I realize now that I did not reboot since writing the chmod command, so the script hasn't had a chance to execute yet. I only wrote the chmod after willysr's reply and I tried to figure out how to start daemon. Thanks, drumz.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.