Closed AlekseyYuvzhikKomodoHealth closed 8 months ago
I found the solution: docker-compose
version: "3"
services:
selenium-hub:
image: selenium/hub:latest
container_name: selenium-hub
ports:
- "4442:4442"
- "4443:4443"
- "4444:4444"
extra_hosts:
- "host.docker.internal:host-gateway"
chrome1:
image: selenium/node-chrome:latest
shm_size: 2gb
depends_on:
- selenium-hub
environment:
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SCREEN_WIDTH=1920
- SCREEN_HEIGHT=1080
ports:
- "7900:7900"
extra_hosts:
- "host.docker.internal:host-gateway"
in driver configuration
while not connected:
port = Browser.find_available_port()
sw_options = {
'auto_config': False, # Ensure this is set to False
'verify_ssl': False, # Ensure this is set to False
'addr': f'0.0.0.0',
'port': port
}
options.add_argument(
f'--proxy-server=host.docker.internal:{port}') # Please use host.docker.internal DNS name, IP could be
# dynamic
options.add_argument('ignore-certificate-errors')
I'm struggling to fix my configuration: docker-compose file `version: "3" services: selenium-hub: image: selenium/hub:latest container_name: selenium-hub ports:
"host.docker.internal:127.0.0.1"
chrome1: image: selenium/node-chrome:latest shm_size: 2gb depends_on:
"7900:7900"`
driver configuration: ` connected = False
Next while loop is a hack to get around the fact if the port was checked by two instances of the