Docker: find container's docker compose-work folder

Docker: find container's docker compose-work folder


Quick-Tip:
Ever had the problem that there is a docker container popping up and you don't know where it comes from?

docker inspect \
--format='{{ index .Config.Labels "com.docker.compose.project.working_dir" }}' \
<container-name>

The result will be the work folder in which the specific docker-compose file might be located (if it was started by docker-compose). At least you have a very good understanding what system has spawned that container.

In order to stop related containers change into this directory and:

docker-compose down

You're welcome...😉

Read more