Expected behavior
To be able to mount a directory and edit files as an unprivileged user in the container. There’s no way to change permissions outside the container…
Actual behavior
Information
Steps to reproduce the behavior
- Create a file, say, index.php in the current directory
docker run -p 80:80 -v index.php:/var/www/html/index.php --name tester php:7-apache
- get inside the container,
docker exec -it tester bash
- inside the container, view the permissions:
ls -lah
-rwxr-xr-x 1 root root 758 Jun 9 05:17 index.php
As a windows user, I expect the permissions to be 777, as they would be if I COPY
them in a Dockerfile.