M
M
Mykola Ivashchuk2017-07-21 09:59:11
selenium
Mykola Ivashchuk, 2017-07-21 09:59:11

How to run dusk in docker?

I use docker and laradock. When I run the command:
php artisan dusk
I get the error:

Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"chrome","platform":"ANY"}}

Failed to connect to localhost port 9515: Connection refused

How to fix it ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zeetabit, 2020-05-11
@zeetabit

since no one answered, I’ll tell the theory, but I won’t give a full example, since there are many implementations for myself (sorry, alas, ah) you need to add selenium (chrome driver)
in the docker container , put chrome (you can also use another browser ) - and a virtual display (if a console container) or alternatively put a container next to it (for example, via docker-compose) with the same good installed, but for example, connect the containers to each other with a virtual network Before starting dusk, the virtual display must be raised and then the chrome driver, it (the chrome driver) is using the selenium compatible protocol and will wait on port 9515 for commands.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question