2

I have two users in my linux system. Each user has their own docker container running for them. Both the user's were able to view and edit the files present in every container.

The files in every container are user specified, as they do git clone to get their files to work on.

Can we able to restrict the usage of user for not accessing the container launched by the another linux user?

Can it be user specific? If yes, Can it be done without adding users inside dockerfile?

Kaviiiiii
  • 21
  • 2
  • Not sure if I understood your issue entirely, but have you had a look at [this](https://stackoverflow.com/questions/29894579/is-there-a-multi-user-docker-mode-e-g-for-scientific-clusters) . Afaik, Docker does not have a multi user setup, users could always start a container as `root` anyway. – Bennimi Nov 28 '22 at 09:15
  • Anyone who can run any `docker` command effectively has root access over the whole host: they can read or write any host file and arbitrarily manipulate containers. Docker doesn't have the concept of a host user owning a container. This might affect how you choose to package your application; do you have a more specific programming-related question? – David Maze Nov 28 '22 at 11:37

0 Answers0