How to run phpunit using docker as host user

Hi. I run phpunit using docker in my laravel project successfully. But when there's error it create log as root user and group instead of my user.

In command line i use this command:

docker run --rm -v $(pwd):/app -w /app --user $(id -u):$(id -g) php71xdebug ./vendor/bin/phpunit mytest.php

and log created with my user and group.

How can i setup docker user configuration (--user $(id -u):$(id -g)) in phpstorm?

1

Please sign in to leave a comment.