Hi i am new user on ubuntu during my practice i install docker by
sudo apt install docker.io
Check the version and all thing properly i started working after it i pull the ubuntu image by
sudo docker pull ubuntu
after it i check the image by
sudo docker images
image is shown by all details after that i make the container by
sudo docker container run -it ubuntu /bin/bash
when i try to see my container by
sudo docker ps
the result is blank
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
But when i write this command
sudu docker ps -a
this shows me the container
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
110359388f2d ubuntu "/bin/bash" 21 hours ago Exited (0) 21 hours ago stupefied_dewdney
How to fix this? Why my container is not showing in docker ps ?
So there is a difference between docker ps
and docker ps -a
docker ps
: shows the running container on your hostdocker ps -a
: this shows running and exited containers on the host.
So in your case your container is exited, means not running on the host thats why this shows in docker ps -a
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With