Today I tried to run my containers in detached mode and I faced some issue.
When I ran the command docker container run -d nginx, the image of nginx got pulled and the output of the container was not shown as it was in detached mode.
Then I ran the command docker container ls which we all know shows only running containers and it showed my nginx container running.
Then I tried the same thing with the ubuntu image i.e. docker container run -d ubuntu but when I ran docker container ls command my ubuntu image was not running, only the nginx container was running.
Why is it so?