# Process manager replacement(systemd, supervisor) for dockerized software

**URL:** <https://forums.docker.com/t/process-manager-replacement-systemd-supervisor-for-dockerized-software/123696>\
**Category:** General\
**Tags:** docker\
**Created:** [April 21, 2022, 6:34am UTC](https://forums.docker.com/t/process-manager-replacement-systemd-supervisor-for-dockerized-software/123696 "2022-04-21T06:34:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![twissell87](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/twissell87/32/34190_2.png) [@twissell87](https://forums.docker.com/u/twissell87)\
**Post date:** [April 21, 2022, 6:34am UTC](https://forums.docker.com/t/process-manager-replacement-systemd-supervisor-for-dockerized-software/123696/1 "2022-04-21T06:34:34Z")

</div>

Hello everyone!

I’ve regular web app that use following software:nginx, php-fpm, PostgreSQL, supervisord(Python), RabbitMQ and Redis cache. I know how to split up in containers all of these software listed except supervisor. The reason of **PID 1 problem** for containers, Docker service should manage this processes itself. So, how to deal with it if I need to run some task as services persistent in memory and periodically the other ones? Run docker from cron on the host OS?

---

<div class="post-metadata">

**Author:** ![terpz](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/terpz/32/36125_2.png) [@terpz](https://forums.docker.com/u/terpz)\
**Post date:** [April 21, 2022, 6:50am UTC](https://forums.docker.com/t/process-manager-replacement-systemd-supervisor-for-dockerized-software/123696/2 "2022-04-21T06:50:13Z")

</div>

Hi 🙂

Its correct that your normally would have 1 service pr container, but if you need to run supervisord in a container to execute muliple scripts, then just do that.

I think that i would (i know nothing about your tasks), make a container pr task, and make a simple “execute → sleep \* hours”

---

<div class="post-metadata">

**Author:** ![twissell87](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/twissell87/32/34190_2.png) [@twissell87](https://forums.docker.com/u/twissell87)\
**Post date:** [April 21, 2022, 7:26am UTC](https://forums.docker.com/t/process-manager-replacement-systemd-supervisor-for-dockerized-software/123696/3 "2022-04-21T07:26:46Z")

</div>

> [@terpz](#):
>
> make a simple “execute → sleep \* hours”

Does docker support this natively or I have to use some third party tool?

---

<div class="post-metadata">

**Author:** ![terpz](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/terpz/32/36125_2.png) [@terpz](https://forums.docker.com/u/terpz)\
**Post date:** [April 21, 2022, 7:32am UTC](https://forums.docker.com/t/process-manager-replacement-systemd-supervisor-for-dockerized-software/123696/4 "2022-04-21T07:32:01Z")

</div>

I meant in your code 🙂

---

<div class="post-metadata">

**Author:** ![twissell87](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/twissell87/32/34190_2.png) [@twissell87](https://forums.docker.com/u/twissell87)\
**Post date:** [April 21, 2022, 7:33am UTC](https://forums.docker.com/t/process-manager-replacement-systemd-supervisor-for-dockerized-software/123696/5 "2022-04-21T07:33:33Z")

</div>

Ah, I got your point 🙂

---

<div class="post-metadata">

**Author:** ![twissell87](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/twissell87/32/34190_2.png) [@twissell87](https://forums.docker.com/u/twissell87)\
**Post date:** [April 29, 2022, 8:05am UTC](https://forums.docker.com/t/process-manager-replacement-systemd-supervisor-for-dockerized-software/123696/6 "2022-04-29T08:05:34Z")

</div>

I’ve faced another problem while designing architecture of my containerized system: how do I execute **php-cli** (php command) from the first container if supervisor placed in the second separate container and only its config files are attached as a volume ?  
P.S. I see only one solution to make one container for php and supervisor.  
BTW there is [supervisor](https://github.com/ochinchina/supervisord) written in Go, so it may have better performance than original.
