PCB
PCB

Reputation: 777

Docker ps Shows the container Docker stop says Invalid

I am trying to stop a docker container which is running

docker ps
shows the container is running 

docker exec -it <containerId> bash
says the container is invalid

`docker stats <containerName>
<ContainerName>      0.00%               0 B / 0 B           0.00%               0 B / 0 B           0 B / 0 B           0


and running below commands gives a PID which is not running on the machine
 docker inspect <copntainerName> | grep Pid

` BUT running docker ps gives me the container is running

Can you tell me how to stop/mark(stopped) this container? I understand the container is not running but the docker machine thinks its running

i mean its not about "real data", about the status of the docker container

docker ps

when I execute docker stop it says invalid

from docker inspect i found the processId , which is not running when I gave ps -eaf

which means the container status is wrong with the docker machine

Docker version used 17.03.1-ce, build c6d412e

Upvotes: 1

Views: 689

Answers (1)

VonC
VonC

Reputation: 1326696

Start with docker container stop.
If it isn't enough docker container kill can help sending a kill message.

In both cases, check the result with docker ps -a.

Upvotes: 2

Related Questions