init script for dockerd-rootless

Janik Besendorf | Reporter Ohne Grenzen <janik.besendorf@reporter-ohne-grenzen.de>
Message ID
DKIM signature
Download raw message

I want to setup docker rootless on alpine. The wiki mentions docker 
rootless (https://wiki.alpinelinux.org/wiki/Docker) and also explains 
how to configure it. However no OpenRC init script is provided to 
automatically start dockerd-rootless as a user.

OpenRC offers several options to run services as a user 
(https://wiki.gentoo.org/wiki/OpenRC/User_services) However they don't 
seem to fit the use case of running dockerd-rootles. For example the 
first method that uses supervise-daemon does not allow the procces to 
fork which is required for dockerd. The second one using pam only works 
when a session of that user is active. That is also not what I want. I 
want to run the service at boot.

I think the best way would be to modify the docker.initd included with 
the docker package 
and drop privileges. Maybe using su or runuser?

I am not really familiar with OpenRC init scripts. Could someone help me 
out with this?

thank you very much.

Reply to thread Export thread (mbox)