Answer the question
In order to leave comments, you need to log in
How to tell docker the linux user from which to create files (laravel migrations)?
Good day!
Environment:
Win10 -> VmWare -> Xubuntu + PhpStorm + Docker + Docker-compose
Issue:
Generating migrations for laravel:
sudo docker-compose exec php-cli php artisan make:migration TABLE_NAME
Answer the question
In order to leave comments, you need to log in
docker exec has a -u parameter in which you can specify a user or his uid
. I think you can even change the root uid in the container to the same as you have on the host machine and as a result, migrations will be created inside the container from root, and in volume to the host the car will belong to you. But it is not exactly :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question