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

WIP: Subcommand to list volumes and their paths #111

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rlupton20
Copy link
Collaborator

Signed-off-by: Richard Lupton [email protected]

Subcommand to provide information on volumes. e.g.

$ ./target/x86_64-unknown-linux-musl/debug/floki volumes
NAME                 MOUNT                HOSTPATH
cache                /cache               /home/richard/.floki/volumes/26c9c57f7c619e3d06f9c4df03e7fd881e59d0986128b6b68af1dd2fb49ee508-cache
global-cache         /global-cache        /home/richard/.floki/volumes/global-cache

@rlupton20
Copy link
Collaborator Author

@bossmc fyi. I will change the interface a bit, but this is a first small step on providing better volume ergonomics.

@bossmc
Copy link
Contributor

bossmc commented Jul 20, 2020

Cool! Some early comments (some of which you may already have done):

  • The path to the non-shared volume is kinda unwieldy to print by default (and are likely not that interesting in 99% of cases)
  • The name of non-shared volumes is namespaced by the floki file right? Suspect you'll want to include the path to the floki-file for those volumes
  • The combination of the above suggests maybe treating the two types of volume completely separately? Maybe floki volume list [--all] or something to hide the non-shared volumes completely by default?
  • It might even be cool to record which floki-files are referencing a shared volume? To help answer questions like "am I using the same .cargo/ cache for all my rust codebases? Probably either behind floki volume inspect <name> or floki volume list --verbose?

This also brings up a question - what cleans up the volumes? The shared ones, probably nothing, that makes sense, but the non-shared ones are invalidated by any change to the floki file right (or maybe it's just the path)?

Also - could/should non-shared volumes be docker volumes rather than host volumes? We don't need the "real" nature of the host volume for non-shared ones, we just want persistence (in theory we could have shared-volumes in docker, but there I suspect the ability to share the volume with the host is valuable)?

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

Successfully merging this pull request may close these issues.

2 participants