1
I am trying to install the Laravel using the official image of the Composer, this is the command:
docker run -it --rm --user $(id -u):$(id -g) -v $(pwd)/src:/src composer create-project laravel/laravel /src
the problem is that it generates the /src folder with root permissions:
-rwxrwxrwx 1 igor igor 1926 mar 28 22:18 dc.sh
-rw-r--r-- 1 igor igor 192 mar 27 19:07 docker-compose.yml
-rw-r--r-- 1 igor igor 1906 mar 27 19:07 Dockerfile
drwxrwxrwx 3 igor igor 4096 mar 27 19:07 machine
-rw-r--r-- 1 igor igor 18 mar 27 19:07 README.md
drwxr-xr-x 2 root root 4096 mar 28 22:21 src
Note that I am already using --user $(id -u):$(id -g)
to pick up the current user and pass it on to Docker, but nothing helps, anyone knows of any other method I can try?
If I use -u it cannot use the cache inside the container because inside it is root :/
– Igor Oliveira