I want to programmatically fetch the id of a running container and stop it. However, I'm a little lost
Here's the command I use to fetch the id of the running container:
docker ps -q --no-trunc --format="{{.ID}}" --filter "ancestor=<repo-name>"
How do I pass the output of this command to
docker stop <id>
I'm new to docker, thus the question. TIA