When I try to docker compose down specific profile, it stops and removes all container. I want to remove only containers that are in referred profile.
docker compose --profile elk down # Let's say I have some services in elk profile
In above example I wanted to bring down only services that are tagged with elk
profile.
CodePudding user response:
We have been experiencing the same issues. I followed the thread on the bug report. It looks like it was not solved yet.
We moved from using compose to swarm (multiple 1 node manager clusters instead of only using compose). And since now we use stacks we don't need profiles anymore.
CodePudding user response:
Same issue here (not really an answer). Alternatively it would be great to have docker compose --profile foo up --remove-orphans
or similar also working.
There was a similar issue about it but it literally just got closed due to inactivity: