[SOLVED] Supervisor starting multiple threads

Hi all, I’m building an app that requires multiple layers and for that reason I’m creating one Dockerfile for each layer (so that each layer cna be reused). I’m basing from ubuntu and exactly have 4 more images.

At the end, I want to run 2 processes, one for mysql and one for my app (tomcat based), so I’m using supervisor to run the two processes, and then using CMD ["/usr/bin/supervisord"] as recommended in docker pages, however when I checks the processes running in the container, I see my mysql process runninc correctly, but 4 processes running my app (4 java processes). It looks like supervisor is starting 1 process for each image I have, so I wonder how can I limit this? it this an expected behavior?

I was able to solve this. So the problem was that the start script for my app was not returning the correct codes, so what I did was add startretries=0 to avoid the process to re-start. In my ToDo for this would be to have the startup script return the correct codes so that it would meet supervisord’s standards, but for now this solution worked.