Lizard Derad
Lizard Derad

Reputation: 379

How to change files ownership in laravel via docker using powershell

I'm using docker on windows. After I created image from Dockerfile docker build -t my-laravel-image in my laravel project I tried to run it docker run -p 8000:8000 my-laravel-image but got the error in the browser ERR_ADDRESS_INVALID

After some digging I found that it is because /storage and /vendor doesn't have right permissions to write. However, I red on linux forum, that to to give permissions to everyone with chmod 777 is bad so I should change owner with chown, however, I could find command which would do the job on Powershell, so I'm asking you for help

the tutorial I am following is https://www.techiediaries.com/docker-compose-laravel/

EDIT Tried this ICACLS "C:\Users\Dominykas\Projects\laravel" /setowner "administrator" it succeded, but I get the same error

Upvotes: 0

Views: 395

Answers (1)

online Thomas
online Thomas

Reputation: 9391

docker exec -it <your container> chown -R myuser:mygroup laraveldir

Upvotes: 1

Related Questions