Kill docker-compose containers without docker-compose.yml file
Without the compose file, docker-compose can't guess the name of the containers that need to be killed. You need to do that manually using docker command:
docker container ls
docker rm -f <container-name-or-id>
You can use docker ps -a
to list all the running containers. After you can use docker stop container-name
to stop individually the containers you want and after you can use docker rm $(docker ps -a -q)
to delete and remove all the stopped containers.
Also if you want to delete the docker images as well you can use docker images
to list the existing images and after docker rmi image-name
to delete the image.