Description
One of alidock's driving principles is that there is a single working directory made visible to your container:
~/alidock -> /home/alidock
Even though data should be moved to that directory in order to make it visible, there are cases in which this is not feasible - for instance, when data is on one or more external disks.
Directory exposure should be implemented by preventing users from doing mistakes with their own Docker installation.
The proposal is to allow users to provide multiple directories that will be mounted inside the container. Command line:
alidock -v /my/dir -v /opt/foo -v /tmp/bar -v /opt/bar
Configuration file (preferred):
---
volumes:
- /my/dir
- /opt/foo
- /tmp/bar
- /opt/bar
alidock will check if they are directories and prevent users from bind-mounting files. If they are symlinks, they are resolved before this check. All directories will be mounted in a flat space, and name clashing is resolved by respecting the order and incrementing a counter:
/mnt/dir
/mnt/foo
/mnt/bar
/mnt/bar2
No nested mounting is allowed since Docker has problems dealing with it. All mount points will be exported in rw
mode by default.
This would solve #52 as well.
The only special case would be /cvmfs
, mounted under /cvmfs
directly (not under /mnt/cvmfs
), and with mount propagation policy shared
(in order to make autofs
work), but only on systems that support it (hence, not macOS).
Of course this is just a proposal, so any comment/objection is welcome.