Ability to create Volume Groups for managing multiple related volumes.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
Reason / Backstory for the feature idea:
On my Mac, I have installed the local version of Supabase, which uses Docker to run the development environment containers and those containers have some automatically created volumes attached to them.
Once I was cleaning out the junk containers, images and the volumes that had been accumulating over time.
When I was about to remove unused volumes with docker volume prune ( since there were so many of them ), I realized that the Supabase-related volumes would be gone too since I am not running the Supabase local version all the time, meaning they also would be "unused", so I avoided potentially breaking the Supabase environment.
After that, I thought to myself:
I'd be great if I could somehow manage these in related batches/groups.
Feature Idea (pseudo-code):
Create volume group
docker volume group create <group_name> [existing_volume_name]
Groups could be created initially empty or provided with existing volumes that don't belong to a group already.
Add volume to a group
docker volume group add <group_name> <volume_name>
Remove volume from a group
docker volume group remove <group_name> <volume_name>
When adding or removing volumes, the volumes should not be in use.
Rename volume group
docker volume group rename <current_group_name> <new_group_name>
Should be self-explanatory, sometimes we make typos or want to give more descriptive name.
List volume groups
docker volume group ls
Also self-explanatory, list the existing groups.
Delete volume group
docker volume group delete <group_name>
Deleting group would delete all the volumes that belong to it.
Could have an option to delete group, but retain the volumes in default volume directory.
Prune volume group
docker volume group prune <group_name>
Delete all unused volumes from a group.
This is the main reason I came up with this idea. By having important volumes, for example, the Supabase-related volumes under e.g "supabase" group and my tinkering-related volumes under e.g "misc", "temp" or similar, I could've easily removed all the non-important volumes at once, instead of one at a time or stacking them with docker volume rm.
In a nutshell:
Instead of having all the volumes listed on one level with same docker volume execution context, we could have them organized into groups in which they share same context and thus provide more granular control and prevent accidentally removing e.g production volumes when deleting multiple volumes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing docker volume command surface and the proposed group operations in this issue. Determine the design, lifecycle rules, and behavior for creating, organizing, pruning, renaming, and deleting groups, including whether deletion retains volumes; done means the feature scope and command behavior are fully specified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100