Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose down -v <service_name> #10

Open
xmichele opened this issue Oct 1, 2019 · 2 comments
Open

docker-compose down -v <service_name> #10

xmichele opened this issue Oct 1, 2019 · 2 comments

Comments

@xmichele
Copy link

xmichele commented Oct 1, 2019

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

@csandanov
Copy link
Member

Please provide more details. What command exactly are you running? What's your OS/distribution? What is the error message?

@xmichele
Copy link
Author

xmichele commented Oct 2, 2019

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)
"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants