Stops a container of your choice
1
name="${1:-my_container}"
2
3
# Stop the container if it is running
4
docker stop "$name" 2>/dev/null || true
5