wodby / docker4php

Docker-based PHP stack
https://wodby.com/docker4php
MIT License
277 stars 44 forks source link

docker-compose down -v <service_name> #10

Open xmichele opened 4 years ago

xmichele commented 4 years ago

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 commented 4 years ago

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

xmichele commented 4 years ago

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:

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