I have some docker containers running on my machine, one of them being container_1
I am able to access container_1's cli using
ant@ant~/D/m/l/db> docker exec -it container_1 bash
daemon@1997cc093b24:/$
This allows me to go to container_1's cli but with no write permissions. The following commands give a permission denied error
ant@ant~/D/m/l/db> docker exec -it container_1 touch test.txt
bash: test.txt: Permission denied
ant@ant~/D/m/l/db>docker exec -it container_1 bash
daemon@1997cc093b24:/$ touch test.txt
bash: test.txt: Permission denied
Also tried using --previleged option but the problem persisted
ant@ant~/D/m/l/db> docker --previleged=true exec -it container_1 touch test.txt
bash: test.txt: Permission denied
So I have 2 questions
- How do permissions in docker work?
- Is this kind of modification to a docker filesystem recommended? If not why?
I have recently started using docker. Please tolorate the amature question. Thanks in advance :)