-
Notifications
You must be signed in to change notification settings - Fork 17
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
[BUG] Can't easily remove underlying volumes #499
Comments
This seems like a real problem, but I don't love the proposed solution borrowed from Compose. Why don't we clean-up containers? Is that just a bug? Why wouldn't we clean-up volumes automatically? |
Docker generally leaves containers around after they've stopped running so that you can go and inspect them afterwards. That seems pretty reasonable but I'd be okay with cleaning them up as well. Presumably the point of having a volume is to persist state between runs of the workspace. Cleaning up the volumes automatically would seem to render them mostly useless — but maybe I'm misunderstanding. |
Gotcha. I think this is related to the work I started over in #385 - I think what I want to do is separate "component" from "resource", so that a component can actually have N >= 0 resources at any given time. For instance, a container component starts with zero resources, then creates one, then when it creates another resource later, it may keep around the old resource for some garbage collection period, etc.
We probably need to give some more thought to the "run" concept. To me, run should be about starting/stopping components, not necessarily about creating/destroying them. That is, if you interrupt a run, it should leave around stateful stuff until you destroy the stack. |
See also "protected resources": #248 |
We don't provide users with any mechanism to remove/empty docker volumes — the equivalent of running
docker volume rm my-vol
. Right now they have to run that command directly. The problem then is that, since we don't clean up containers, the user will be presented with an error like the following:I would propose we add a
--remove-volumes
flag to theexo stop
command to handle this. Docker compose has a similar flag: https://docs.docker.com/compose/reference/down/The text was updated successfully, but these errors were encountered: