LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-05-2022, 09:48 AM   #1
Tsuga
Member
 
Registered: Jul 2020
Distribution: Slackware64 15.0
Posts: 63

Rep: Reputation: Disabled
Docker on -Current error: "Is docker daemon running?"


I found this thread: https://www.linuxquestions.org/quest...495/page2.html

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'.
From the docker documentation on the website for use with linux, it says use:

Code:
env | grep DOCKER_HOST
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.
 
Old 01-05-2022, 09:59 AM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,687

Rep: Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803
after you put the script in /etc/rc.d, did you run /etc/rc.d/rc.docker start?
 
1 members found this post helpful.
Old 01-05-2022, 10:28 AM   #3
Tsuga
Member
 
Registered: Jul 2020
Distribution: Slackware64 15.0
Posts: 63

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-05-2022, 10:49 AM   #4
Windu
Member
 
Registered: Aug 2021
Distribution: Arch Linux, Debian, Slackware
Posts: 599

Rep: Reputation: Disabled
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.

Last edited by Windu; 01-05-2022 at 10:51 AM.
 
2 members found this post helpful.
Old 01-05-2022, 11:00 AM   #5
Tsuga
Member
 
Registered: Jul 2020
Distribution: Slackware64 15.0
Posts: 63

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-05-2022, 11:06 AM   #6
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 907

Rep: Reputation: 698Reputation: 698Reputation: 698Reputation: 698Reputation: 698Reputation: 698
Quote:
Originally Posted by Tsuga View Post
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.
 
2 members found this post helpful.
Old 01-05-2022, 11:11 AM   #7
Tsuga
Member
 
Registered: Jul 2020
Distribution: Slackware64 15.0
Posts: 63

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply

Tags
current64, docker



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NordVPN App - "Whoops! Cannot reach System Daemon." when running "nordvpn c" glupa4e Slackware 16 12-09-2021 12:56 PM
[SOLVED] Not sure what "console-kit-daemon --no-daemon" means mark_alfred Linux - General 2 12-18-2011 04:59 PM
Running current + Alien Bob's KDE4.6 pkg. Dbus Daemon uses 50% processor. vdemuth Slackware 1 03-01-2011 07:14 PM
Help With Java Problem Please"""""""""""" suemcholan Linux - Newbie 1 04-02-2008 06:02 PM
KPowersave's "The powersave daemon is not running" error MichaelMax SUSE / openSUSE 4 12-05-2005 11:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration