You can show all processes running inside the container without entering the terminal using the following command. Of course, this is similar to what you can see with ps -eaf , so just add it to docker exec .
bash $ sudo docker exec -it test1 ps -eaf PID USER TIME COMMAND 1 root 0:00 sh 7 root 0:00 sh 60 root 0:00 /bin/sh 67 root 0:00 /bin/sh 84 root 0:00 ps -eaf
As already mentioned, if you are already inside the container, just use the ps -eaf to see the running processes.
By the way, it is recommended to have one application / process for each container.
source share