how to stop docker

C++
//Check if the container is running
docker ps -a

docker container stop {container-id}systemctl stop docker.service
#(OR)
systemctl stop docker
# it will start dockerdocker stop <ContainerID>
Source

Also in C++: