Setup Laradock + Laravel Dusk
To start running your Dusk tests with Laradock, in addition to the installation as explained in the official Laravel documentation, two more steps are needed.
First of all, you must create a specific environment file for Dusk, just following the official Laravel documentation (Environment Handling).
In the new file (for example, .env.dusk.local) the variable APP_URL must be set to http://nginx.
And, in the tests / DuskTestCase.php file, change the url of the selenium server to http://selenium: 4444/wd/hub.
It’s ready, now you can run your Dusk tests:
php artisan dusk