Home | News | Download | Packages | Forum | Wiki | Github

Running docker in musl void?


#1

Trying to run Docker to add certain things missing in musl Void (e.g. Java). I’ve never run Docker before, so these may be naive questions.

But, after installing docker (as well as docker-machine for good measure), when I try sv start docker I get the message “warning: docker: unable to open supervise/ok: file does not exist”

When I look in /etc/sv/docker supervise is symlinked to /run/runit/supervise.docker (which doesn’t exist).

Not sure how to proceed.


Unable to open supervise/ok: file does not exist [SOLVED]
#2

I run docker on musl void without any issue.
I don’t know why the run file in your /etc/sv/docker is missing
but this is what my ‘/etc/sv/docker/run’ contains:

#!/bin/sh [ -r conf ] && . ./conf modprobe -q loop || exit 1 exec chpst -o 1048576 -p 1048576 dockerd $OPTS 2>/dev/null

don’t forget to add your user to the docker group.

i have those docker packages installed:
docker docker-compose docker-gen docker-machine kubernetes

but docker and docker-machine is enough to use it.

you used sudo sv start docker right?


#3

Did you first create the docker symlink in /var/service, i.e.

ln -s /etc/sv/docker /var/service/

to enable the service?


#4

Ok, maybe I should forcibly remove and re-install docker stuff and then see where I am.


#5

I did. I think I did this after installing docker but before installing docker-machine. Perhaps this makes a difference.


#6

I just tested it and installed docker, created the symlink in /var/service and the service was up without any problem. I think runit creates the /run/runit/supervise.docker directory when you create the symlink in /var/service and runit starts the service. So I guess something went wrong there, because supervise.docker doesn’t exist. I once made a spelling error and was wondering why a service did not start. Took me a while to figure that out :wink:


#7

Hmm… I’ve uninstalled all the docker stuff, and re-installed it, but it still wouldn’t create a /run/runit/supervise.docker directory. I tried the same thing after manually creating this directory, but no luck. (Again, running ln -s /etc/sv/docker /var/service/ afterwards.) Still get the same error when I try sudo sv start docker.


#8

You don’t have to start the service after you link it into /var/service it starts automatically, and the supervise directory is created at the time the service starts.


Pure-ftpd runs from CLI but not from /etc/sv/pure-ftpd AND/OR /var/service/pure-ftpd
#9

Docker doesn’t seem to be running despite having been linked into /var/service.

And when I try to start it manually, it complains

warning: docker: unable to open supervise/ok: file does not exist.

And if I try to run something, e.g. docker run hello-world, it can’t find a docker service running, reporting:

docker: Cannot connect to the Docker daemon at unix://var/run/docker.sock. Is the docker daemon running?.

I’m sure I’m doing something daft, as I’m new to both Docker and runit.


#10

You need privileges to connect to the docker daemon.
Check the permissions of /var/run/docker.sock.


#11

I’ll check on that, but it seems to be a more generalised issue. I’m having the same thing happen with sshd (i.e. the warning unable to open supervise/ok: file does not exist).

Other than using musl, the only ‘non-standard’ thing about my install is that it’s on ZFS.

What would I do to go about debugging this?


#12

For those coming to this post, I had the same issues today and a reboot worked.