Does not require an additional file to start the services (supervisord.conf)
Start services the same way inside a container as it would outside the container
It's easier then supervisord to manage services' lifecycle (start/stop/restart)
It can run in a non-privileged container
It kills zombie processes
But mostly, it solves the problem we were having when the container restart without removing the PID files properly
What changed to do it:
The base image is still centos7 but a few extra commands are required to run systemd properly inside a docker container. Those commands were added to this new Dockerfile located inside the systemd folder.
When running this new container you have to mount /tmp and /run as tmpfs and /sys/fs/cgroup as read-only.
I also added a new docker-compose file (docker-compose.systemd.yml) to make the life easier of anyone who wants to build and run this version.
Why to use systemd:
What changed to do it:
I also added a new docker-compose file (docker-compose.systemd.yml) to make the life easier of anyone who wants to build and run this version.