I built a docker image from a docker file. Build said it succeeded. But when I try to show docker containers through docker ps
(also tried docker ps -a
), it shows an empty list. What is weird is that I'm still able to somehow push my docker image to dockerhub by calling docker push "container name"
.
I wonder what's going on? I'm on Windows 7, and just installed the newest version of dockertoolbox.
It may be that the application failed to start. Show activity on this post. For me, the only thing resolving the issue is to reinstall docker. Also, one must be sure that the disk is not full.
Introduction to Docker ps. The 'docker ps' is a Docker command to list the running containers by default; however, we can use different flags to get the list of other containers that are in stopped or exited status. We can also manipulate the output as per our requirement using flags.
In order to list the Docker containers, we can use the “docker ps” or “docker container ls” command. This command provides a variety of ways to list and filter all containers on a particular Docker engine.
The docker ps command, which is available inside the container, is used to see the status of the process. This is similar to the standard ps command in the Linux environment and is not a docker ps command that we run on the Docker host machine.
docker ps
shows (running) containers. docker images
shows images.
A successfully build docker image should appear in the list which docker images
generates. But only a running container (which is an instance of an image) will appear in the list from docker ps
(use docker ps -a
to also see stopped containers). To start a container from your image, use docker run
.
For me, docker ps -a
and docker images
both returned an empty list even tho I had many docker containers running. I tried rebooting system with no luck. A quick sudo systemctl restart docker
fixed this "bug".
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