I'm kind of new to Docker and Linux. I was wondering what does "running in background" means when it comes to containers since I can't find a process that relates to a background RUNNING container.
I ran htop filtered on docker
and started 2 containers:
docker run nginx
--> As I expected, a process appeared in htop (child of the shell who launched it)docker run -d nginx
--> Nothing appeared here (the container IS running though)
I couldn't find any explanation (I'm probably just not looking where I should...). What is happening here ?
EDIT:
I eventually figured out the "issue" which, as usual, lay between my chair and my keyboard: I'm running a headless linux VM on macOS and it didn't occur to me (until now (╬ಠ益ಠ)) that I wasn't launching my commands on the VM but directly on my host OS.
So under the hood docker on macOS was using its own linux VM and my htop
command only listed the one linked to an opened 'host' terminal...
See How to retrieve docker container name from pid of docker exec on the host (MacOS)