How to run multiple processes inside a docker container?

How do I launch multiple processes during the startup of a docker container? I tried setting the commands in the Dockerfile using the CMD option. Also, tried the ‘command’ option in the docker compose file. It didn’t work.

I came across this document suggesting to use 'Supervisor’
https://docs.docker.com/engine/admin/using_supervisord/#exposing-ports-and-running-supervisor

Is ‘Supervisor’ the only option to run multiple process within a docker container? Is there any way to achieve this without using ‘Supervisor’?

there are multiple ways. run a bash script which lets processes go in background. use this when you do not care if the processes die.

use supervisor, systemd, crm, daemon-tools, … when you want that somebody restarts your processes once they die.

but really, think twice before deploying multiple processes into one container. it basically destroys all advantages from containerization.