AkihiroSuda / containerized-systemd

Dockerfile examples for containerized systemd (mainly for test environments)
https://github.com/moby/moby/pull/40493
Apache License 2.0
122 stars 20 forks source link

is there a way to prevent closing the container after finish command? #12

Open benayat opened 1 year ago

benayat commented 1 year ago

I'm running on ubuntu, and I want to keep the container alive after it finishes the command. is there a way to do that?

spurin commented 1 year ago

Possibly this would be using the container as a base in your docker file and then wrapping the command in question into a systemd unit file. When it runs it would be using systemd as the main entrypoint and this would be one or more of the services executed.