Docker is a developer tool which help us to run applications in an isolated environment, where you can start a service, app,local host, MySQL, SQL server, mongodb etc.
Get the container id
To stop container we can use ids of container they, can be , many. First thing we need grab all the ids using the
docker pa -aq
Then use those ids as arguments to stop command as follows
docker stop $(docker ps -aq)
that’s it
Docker posts that may help you
- Docker-compose for projects - How use docker-compose to run MySQL database base for development
- Create a docker image of Node-Express API – Part II - How to build Node-Express project Docker Image using Node base image
- Create a docker image of Node-Express API – Part I - How to build Node-Express project Docker Image.
- Howto to stop all containers at once in docker - How to stop all containers in docker
- Create portfolio app with nginx in 5 minute - How to create and run bootstrap portfolio site in docker container using nginx in 5 minute
- Howto to remove all containers at once in docker - How to remove all containers in docker
- Start a nginx app container in Docker - How to run a nginx web app in Docker container
- Howto download images in Docker - How to download docker images
- Docker : A tool for developers - About Docker and containers for developing and deploying apps