Finally got around to running #systemd on #GitHub Codespaces
https://github.com/gbraad-devenv/fedora-systemd/
Here using #Fedora and my personalized developer images. But I added a summary that shows it is two commands that are essential:
"overrideCommand": false, "privileged": true
and making sure:
USER root ENTRYPOINT [ "/sbin/init" ]
is set for the container.
=> More informations about this toot | More toots from gbraad@mastodon.social
This is mostly in response to the following message: https://github.com/orgs/community/discussions/68954#discussioncomment-9850884
=> More informations about this toot | More toots from gbraad@mastodon.social
Try it yourself:
https://codespaces.new/gbraad-devenv/fedora-systemd
=> More informations about this toot | More toots from gbraad@mastodon.social
@gbraad I've been doing this at work for a while. Not GitHub codespaces specifically, but running systemd under Docker.
One thing I had to add was:
STOPSIGNAL SIGRTMIN+3
as without that, I'm unable to gracefully shut down any systemd container and have to forcibly kill it. This is with CentOS 7 and Oracle Linux 8.
=> More informations about this toot | More toots from smallsco@oldbytes.space
@smallsco
I have not had this issue for podman on my workstation, but on github actions it does not shutdown/halt either. so maybe this is related.
=> More informations about this toot | More toots from gbraad@mastodon.social
@gbraad Yeah, that's almost certainly it. I run systemd containers through GitHub actions regularly for work, and without setting the correct stopsignal they will hang until killed by the runner.
=> More informations about this toot | More toots from smallsco@oldbytes.space
@smallsco Tried to use external monitoring: https://github.com/gbraad-devenv/countdown-test
so you can also gracefully stop the container from inside by informing the outside. Found it too cumbersome for general implementation.
=> More informations about this toot | More toots from gbraad@mastodon.social
@smallsco don't want to make a docker specific Containerfile, so will run a test with --stop-signal=RTMIN+3
.
=> More informations about this toot | More toots from gbraad@mastodon.social This content has been proxied by September (ba2dc).Proxy Information
text/gemini