I need to run Docker Rootless on an Alpine Linux 3.19.0 instance. I have followed the instructions of this blogpost in order to create a basic setup with an user named dev. I wish to configure it as an rc-service so as to keep the Rootless Docker service constantly running under the hood.
However, the script setup on the blog post has an apparent problem with the $PATH variable (I imagine the problem is there, although I do not know Linux that much) in which trying to run this service:
#!/sbin/openrc-run name=$RC_SVCNAME description="Docker Application Container Engine (Rootless)" supervisor="supervise-daemon" command="/home/dev/bin/dockerd-rootless.sh" command_args="" command_user="dev" supervise_daemon_args=" -e PATH=\"/home/dev/bin:/sbin:/usr/sbin:$PATH\" -e HOME=\"/home/<USER>\" -e XDG_RUNTIME_DIR=\"/home/dev/.docker/run\"" reload() { ebegin "Reloading $RC_SVCNAME" /bin/kill -s HUP \$MAINPID eend $? } while using these variables in /home/dev/.profile:
export XDG_RUNTIME_DIR="$HOME/.docker/run" export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock export PATH="/home/dev/bin:/sbin:/usr/sbin:$PATH" returns this very long error which I do not know the cause of:
/lib/rc/sh/openrc-run.sh: /etc/init.d/docker-rootless: line 9: supervise-daemon-args= -e "/home/dev/bin:/sbin:/usr/sbin:/lib/rc/sbin:/lib/rc/bin:/bin:/sbin:/bin:/sbin:/usr/shbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" -e "/home/dev" =e "home/dev/.docker/run": not found If anyone could help me to realize where the error is I would be very thankful.