Vzzarr
Vzzarr

Reputation: 5650

Can't find docker-compose running

I'm trying to stop a container generated by a docker-compose up but I can't find where this docker-compose was started. If I try to kill the docker container it is automatically recreated (as expected since it is docker-compose).

When running the command docker-compose ps in the folder containing the docker-compose.yml file I get an empty result, so it should be somewhere else...

How can I find where the docker compose is running and finally stop it?

Upvotes: 0

Views: 7163

Answers (2)

Vivek Anand
Vivek Anand

Reputation: 1374

Use docker ps -a | grep <certain_container>

Use locate docker-compose.yml and find the one that you want Use docker-compose down

Upvotes: 2

leeman24
leeman24

Reputation: 2889

Option #1:

Install docker-compose which would be available on your path using the official instructions - https://docs.docker.com/compose/install/.

You can then go to the folder containing the docker-compose.yml and run docker-compose down.

Option #2:

Search for the file using something like:

find / -name "docker-compose"

You can then use the absolute path when running the command.

Option #3:

Update your containers restart policy:

docker update --restart=no container_name

Upvotes: 1

Related Questions