I start with
docker run rasa/rasa
as tutorials from Youtube suggest.
but when I do
docker ps
it shows empty list of containers. I thought run command should start container processing.
Why is doesnt start? What am I doing wrong?
Also
docker ps -a
shows me a giant list of exited containers, but I didn't exit them.
With command docker ps -a command shows you all the containers running/stopped/exited. These are the containers that you tried to run but somehow due to some internal errors those container got stopped and are not running anymore and it shows the status exited(not running).
With command docker ps, it shows only running containers. As no containers are running on your machine thats why it is not showing anything. It requires -a argument to show you the all containers like docker ps -a (Show all containers).
Related
I have a server in which the docker containers were running. Server got shutdown. How to know which container was on; Because container list are empty now.
Run this command to see whats container is running :
docker ps
To see all containers whaterver it doesnot running or is up:
docker ps -a
And check time container went down.
Bring it up :
docker start container_id
Found out that there where no containers started. If it where, the containers would of been stopped.
Anyone who works with Docker regularly is familiar with the common commands docker ps and docker ps -a.
I know that docker ps lists all running containers in the Docker engine, but what does the "ps" actually mean?
I also know that docker ps -a has the effect of also listing containers that have stopped, but what does the -a actually mean?
-a is short form for the --all. option This option will show all the containers both stopped and running.
ps is an abbreviation for "process status". Normally, docker ps only shows the running containers, but adding the -a option causes it to show all containers.
You can find more details in the Docker "ps" options documentation.
ps means “Process Status”, so docker ps basically shows all of the Docker processes actively running.
docker ps lists all containers that are up and running.
-a means all (both stopped and running) containers.
docker ps = docker container list = docker container ls
All commands above are aliases.
The command docker ps is very useful. For example:
docker container kill $(docker ps -q) — Kill all running containers.
docker container rm $(docker ps -a -q) — Delete all not running containers.
The command docker ps was created based on unix's ps command. Here, ps is an abbreviation for "process status".
Translated to docker, docker ps lists containers. Executing docker ps lists all running containers, while executing docker ps -a (or docker ps --all) lists all containers.
Anyone who works with Docker regularly is familiar with the common commands docker ps and docker ps -a.
I know that docker ps lists all running containers in the Docker engine, but what does the "ps" actually mean?
I also know that docker ps -a has the effect of also listing containers that have stopped, but what does the -a actually mean?
-a is short form for the --all. option This option will show all the containers both stopped and running.
ps is an abbreviation for "process status". Normally, docker ps only shows the running containers, but adding the -a option causes it to show all containers.
You can find more details in the Docker "ps" options documentation.
ps means “Process Status”, so docker ps basically shows all of the Docker processes actively running.
docker ps lists all containers that are up and running.
-a means all (both stopped and running) containers.
docker ps = docker container list = docker container ls
All commands above are aliases.
The command docker ps is very useful. For example:
docker container kill $(docker ps -q) — Kill all running containers.
docker container rm $(docker ps -a -q) — Delete all not running containers.
The command docker ps was created based on unix's ps command. Here, ps is an abbreviation for "process status".
Translated to docker, docker ps lists containers. Executing docker ps lists all running containers, while executing docker ps -a (or docker ps --all) lists all containers.
Why does docker compose create containers that are only accecible from docker-compose ps and that persist after killing running container ?
It doesn't.
docker ps only shows running containers, docker-compose ps shows all containers related to the current compose file, running and stopped. docker-compose kill just force stops the container and it can be restarted with docker-compose start, it will therefore be visible when running docker-compose ps but not docker ps.
To list all containers with docker use docker ps -a. To removed stopped containers related to a compose file run docker-compose rm, if you want to stop and remove all containers, have a look at docker-compose down.
docker-compose is the software wrapper around docker and there is not full support still. You can try to read a little bit about kubernets and mesos for the comparing different clusters built on top of docker or similar container systems.
article on blog about swarm and compose
I am using docker-machine with Google Compute Engine(GCE)
to run a
docker swarm cluster. I created a swarm successfully with 2
nodes
(swnd-01 & swnd-02) in the cluster. I created a daemon container
like this
in the swarm-manager environment:
docker run -d ubuntu /bin/bash
docker ps shows the container running on swnd-01. When I tried
executing a command over the container using docker exec I get the
error that container is not running while docker ps shows otherwise.
I ssh'ed into swnd-01 via docker-machine to come to know that container
exited as soon as it was created. I tried docker run command inside the
swnd-01 but it still exits. I don't understand the behavior.
Any suggestions will be thankfully received.
The reason it exits is that the /bin/bash command completes and a Docker container only runs as long as its main process (if you run such a container with the -it flags the process will keep running while the terminal is attached).
As to why the swarm manager thought the container was still running, I'm not sure. I guess there is a short delay while Swarm updates the status of everything.