-
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 start service or rc-service #437
Comments
Exactly the same issue here. The message tells it all. Looks like a vicious circle... Does it means that Alpine completely relies on any kind of orchestrator to react to a service getting down? About your specific case with ssh : I guess your goal is to connect to your container to look a what's going on while testing your Dockerfile instructions... |
I have the same problem , and who can fix it? I'm puzzled by it for days! |
@heavenkiller2018 What are you trying to do? But I have learnt this is not the right way to do it. Actually, I realized it while writing my last post on this thread : indeed, Alpine relies on some kind of orchestrator to manage the resilience of your services. The right design would be to dedicate one container for each service. Using containers implies a slightly different architecture of the deployment of your application. While testing on your desktop, you could use docker-compose to build and run your containers together. |
I have the same problem too 🤷♂️ |
any solution? |
add this in your Dockerfile: VOLUME [ “/sys/fs/cgroup” ] or add volume like this when run image:
|
@Veitor Great, thank you |
To enable Secondary Services beside the Main Service I used the
In the
At Container Launch Time It produces the following Output:
However, if the Container was previously launched with
The Main Service is running fine but the "rsyslog" Service stays dead. |
I wondered what might contain the required
It shows at Launch Time:
The required file does actually contain nothing. |
This dockerfile is working. Weirdly I need to run rc-status first.
|
This works fine to my alpine 3.14 and 3.15, after also adjusts. |
- Use OpenRC to run the ipsec service in the Alpine-based image, instead of running the ipsec command directly. Ref: hwdsl2/setup-ipsec-vpn@a891b76 gliderlabs/docker-alpine#437
- Use OpenRC to run the ipsec service in the Alpine-based image, instead of running the ipsec command directly. Ref: hwdsl2/setup-ipsec-vpn@a891b76 gliderlabs/docker-alpine#437
thanks @finzzz. This happened to me as well. Run rc-status solved the problem. (as you mentioned, it's weird) |
2y later, I had the same problem and it took a couple of hours to get to this FROM alpine
RUN apk update \
&& apk add --no-cache \
openssh-server \
#TODO: Remove next line if no ssh client needed to reduce attack surface
openssh \
&& sed -ie "s/#PubkeyAuthentication/PubkeyAuthentication/g" /etc/ssh/sshd_config \
&& sed -ie "s/#PasswordAuthentication yes/PasswordAuthentication no/g" /etc/ssh/sshd_config
RUN ssh-keygen -A
RUN adduser -D app
RUN chown app /etc/ssh/ssh_host_*
RUN touch /run/sshd.pid && chown app /run/sshd.pid
USER app
RUN ssh-keygen -t rsa -q -f "$HOME/.ssh/id_rsa" -N "" && \
cp /home/app/.ssh/id_rsa.pub /home/app/.ssh/authorized_keys
EXPOSE 2222
ENTRYPOINT ["sh", "-c","exec /usr/sbin/sshd -D -e"] server:
client:
Turns out you don't necessarily need the OpenRC, since sshd can run fine if you start it directly. |
Similar with #183 , but still not work.
The text was updated successfully, but these errors were encountered: