8000 Expose additional directories in the container · Issue #64 · alidock/alidock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content 8000
This repository was archived by the owner on Sep 1, 2021. It is now read-only.
This repository was archived by the owner on Sep 1, 2021. It is now read-only.
Expose additional directories in the container #64
Closed
@dberzano

Description

@dberzano

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0