I am thinking about providing docker hosting for some of my customers. I would give these customers access via ssh to my server, allowing the execution of docker, docker-compose, git, nano and the usual file system operations.
Obviously these users would only have access to their own directories in which they then can download their git repositories with their docker-compose files and configurations. Users can register their docker containers with our traefik load balancer using docker labels.
This far this approach is quite production ready.
However as I can enter basically every local mount point in a docker-compose.yml the user could just mount directories from other users and thus I have created a data breach. Is there any way to limit people from which directories they are allowed to mount in their respective docker-compose files (or with the docker cli?) - to be clear with the same docker installation with different users: each user should only be allowed to mount directories under their own root in their containers.
Also is there a way to disallow exposing of ports to the host for docker containers started by specific users?