grammarly/rocker

MOUNT to use custom volume for reuse with `docker run`

muja opened this issue · 3 comments

muja commented

When I mount volumes in build, I have no easily scriptable way to reuse those volumes in docker run (unless I'm mistaken - would gladly appreciate help).

If I have a simple MOUNT /some_dir for example, and fill that during build, I need to find the volume's name with docker ps -a and copy it to use for --volumes-from rocker_mount_HASH.

  1. is there a way to avoid that?
  2. if not, I think it would make sense to specify a volume by name in MOUNT.
rodio commented

Hello, @muja!

  1. It seems like there is no way to avoid that.
  2. We'll discuss this.

Thanks for your comment!

muja commented

Hi @rodi, yes I have come to realize that it's not easily feasible and created a workaround that suits my needs. The best solution I think would be to enable MOUNTing a volume by name that is used (if it already exists) or created (if not). This would be really useful in cases where you want to reuse the volume during a run.

I also have a hint of an idea how it might be implemented: currently, relative paths are not allowed in MOUNT, so a backward-compatible solution could be to map some/relative/path to mount /relative/path from volume some instead. Just an idea.

I wish you all the best.

Thanks for your question. Unfortunately, we are discontinuing this project. See the notice here: https://github.com/grammarly/rocker/blob/master/README.md

Closing this as we are not able to address it. Sorry.