Command | Description |
---|---|
docker ps -a | Retrieves a list of the containers and their IDs |
docker stop container-id | Stops a running container |
docker rm container-id | Removes a container
Note: The
docker rm command is not needed if the image was run with the
--rm option, which automatically removes the container when it is stopped.
|
docker images | Retrieves a list of the images and their IDs |
docker rmi image-id | Removes an image |