docker4php
docker4php copied to clipboard
docker-compose down -v <service_name>
Hello,
and my greetings for your interesting project. Regarding @docker-compose down -v $(filter-out $@,$(MAKECMDGOALS)) in Line36 of https://github.com/wodby/docker4php/blob/master/docker.mk . It seems that you can't select the specific service and related volumes with docker-compose down ( I have "usage" options error under windows and linux). While With docker-compose logs it works
Please provide more details. What command exactly are you running? What's your OS/distribution? What is the error message?
Assuming that I have done docker compose up with a yaml containing the myservice service , I would like to stop and remove only that container and its volumes. Tried on windows 10 and RHEL 7.5 with docker-compose 1.24
docker-compose down -v myservice
I have the errror:
"
Stops containers and removes containers, networks, volumes, and images
created by up
.
By default, the only things removed are:
- Containers for services defined in the Compose file
- Networks defined in the
networks
section of the Compose file - The default network, if one is used
Networks and volumes defined as external
are never removed.
Usage: down [options]
Options:
--rmi type Remove images. Type must be one of:
'all': Remove all images used by any service.
'local': Remove only images that don't have a
custom tag set by the image
field.
-v, --volumes Remove named volumes declared in the volumes
section of the Compose file and anonymous volumes
attached to containers.
--remove-orphans Remove containers for services not defined in the
Compose file
-t, --timeout TIMEOUT Specify a shutdown timeout in seconds.
(default: 10)
"