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
- How to use MSSQL Server on ARM based Mac. - How to use MSSQL Server on ARM based Mac M1,M2
- Access Docker MSSQL Container from Parallel (Mac Mini M2) - How to access Docker Contained DB from Parallel.
- Mac Mini M2 for Windows Developers - Moving from Windows to Mac
- Deploy golang API in Digital Ocean using docker container - How deploy golang API with docker container
- How to Containerize Golang app with Docker - How to containerize Golang app using Docker
- How to create a strapi project with Docker on Windows - How to create a strapi project with Docker in Windows
- 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