Merge pull request #653 from rogererens/patch-1

Add `docker ps -a`
This commit is contained in:
John Mulhausen 2016-11-21 12:51:21 -08:00 committed by GitHub
commit cb9460a8b1
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ Run these commands to test if your versions of `docker`, `docker-compose`, and `
4. Stop or remove containers and images.
The `nginx` webserver will continue to run in the container on that port until you stop and/or remove the container. If you want to stop the webserver, type: `docker stop webserver` and start it again with `docker start webserver`.
The `nginx` webserver will continue to run in the container on that port until you stop and/or remove the container. If you want to stop the webserver, type: `docker stop webserver` and start it again with `docker start webserver`. A stopped container will not show up with `docker ps`; for that, you need to run `docker ps -a`.
To stop and remove the running container with a single command, type: `docker rm -f webserver`. This will remove the container, but not the `nginx` image. You can list local images with `docker images`. You might want to keep some images around so that you don't have to pull them again from Docker Hub. To remove an image you no longer need, use `docker rmi <imageID>|<imageName>`. For example, `docker rmi nginx`.