stop docker image code example
Example 1: docker remove all containers
docker rm $(docker ps -a -q)
Example 2: remove docker image
docker image rm [image id]
Example 3: stop docker container
//Check if the container is running
docker ps -a
docker container stop {container-id}
Example 4: remove docker images
docker system prune -a
Example 5: how to stop docker
systemctl stop docker.service
#(OR)
systemctl stop docker
# it will start docker
Example 6: stop docker image
docker stop <image_name>