ucan-lab / docker-laravel

🐳 Build a simple laravel development environment with Docker Compose.
https://dev.to/ucan_lab/how-to-install-and-set-up-laravel-s-local-development-environment-with-docker-compose-5bcf
MIT License
1.17k stars 377 forks source link

Getting permission denied when I try to change any files in the src folder #258

Closed nanotexnolagiya closed 5 months ago

nanotexnolagiya commented 5 months ago

Initialized project with

make create-project

After that if I try change any files I'm getting error that I don't have a permission to change file Docker version 26.0.0 OS: Ubuntu 22.04

nanotexnolagiya commented 5 months ago

As I see composer creating files with root user.

ucan-lab commented 5 months ago

Will using Rootless mode solve the problem?

https://docs.docker.com/engine/security/rootless

ucan-lab commented 5 months ago

@nanotexnolagiya I created a general user inside the container so that I could map the UID and GID of the Linux user on the host side. Please try it.

nanotexnolagiya commented 5 months ago

@nanotexnolagiya I created a general user inside the container so that I could map the UID and GID of the Linux user on the host side. Please try it.

This really helped, thanks!