-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't use service or rc-service #183
Comments
I just found #26 and it seems to be the same question.. So, what should I do to run the docker daemon inside an alpine docker image? |
I'm trying to run a service inside of the docker For context:
As described here, "Alpine Linux uses OpenRC for its init system." However, I can't seem to be able to find it. |
yeah, docker images based on alpine don't have service or rc-service enabled. |
How to enable? |
rc-service is part of openrc, install openrc
|
Alpine is so great lol |
What then is the process for getting docker running?
|
I'm also having this problem, any ideas?
Thanks! |
openrc is normally started via |
I'm hitting these errors as well. Did you solve it @rm-rf-etc ? |
Do you know the answer now? |
I'm tired about this stuff. Yes, it's "small" and "secure", yes it is because even me the root user of it cannot do anything I want in it. |
Time to turn around and go back. hehe |
Any update on this issue? |
Same issue. I'm on alpine 3.9. So I did
ouput:
But it's not!
|
I'm not sure why you care so much about the
? |
There's also https://github.com/dockage/alpine/blob/master/3.9/openrc/Dockerfile . You then could just
in you dockerfile and not touch ENTRYPOINT/CMD. It will start the openrc in the container as normal boot would. But than again, in your example, I would just start apache directly... |
I posted hastily. I didn't understand how Docker started the container. (I deleted my note.) I had In the Dockerfile, added:
However, it didn't handle docker restart. It hangs on shutdown. Update: followed your advice, got rid of openrc, ran httpd directly. Now it works. |
So has the issue not progressed so far? |
This issue is closed, so I'm not sure any progress can be expected. What progress would you like to see? There generally should not be a need to run openrc in docker container. |
I'm running a couple of different processes in an alpine docker container and watch their output with rsyslog. I wanted to use openrc so that I could reload rsyslogd after log file rotation - however, I discovered that I could simply have rsyslog output directly to /proc/1/fd/0, instead of a log file. Just posting this here in case someone lands on this page while searching for a similar problem. |
I've thought that I'm clever one ... nope xD
|
Instead of using |
I figured out this Workaround to be able to start Secondary Services |
you can find its status still is stopped if you perform 'service docker status' after 'Service docker start' |
i dont know if anyone still has this problem but running sudo openrc worked for me |
Just ran into the same issue, peeked at the source code for OpenRC to see what it is doing, ran with It turned out that you also need to |
Thanks a lot! Worked for me! |
Sum up, for apk add openrc --no-cache
mkdir -p /run/openrc/exclusive
touch /run/openrc/softlevel
apk add docker
service docker start
rc-update add docker |
It works indeed! Not only for docker, but sshd and any others. |
Thanks I faced the same problem when running |
The text was updated successfully, but these errors were encountered: