mirror of https://github.com/docker/docs.git
commit
cb9460a8b1
|
@ -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`.
|
||||
|
||||
|
|
Loading…
Reference in New Issue