Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker ps shows empty list

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.

like image 207
Ville Miekk-oja Avatar asked Mar 15 '16 14:03

Ville Miekk-oja


People also ask

Why is docker Photoshop empty?

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.

What is docker ps a command lists?

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.

How do I list all containers in docker?

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.

What is docker ps status?

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.


2 Answers

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.

like image 92
Sven Koschnicke Avatar answered Oct 18 '22 18:10

Sven Koschnicke


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".

like image 25
Erik Kokalj Avatar answered Oct 18 '22 19:10

Erik Kokalj