Skip to content

Commit

Permalink
chore: selenium grid changes
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasnogueira committed Oct 27, 2024
1 parent 3854636 commit 1832f49
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
14 changes: 10 additions & 4 deletions grid/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ configs = [
"selenium/standalone-chrome:latest", "{\"browserName\": \"chrome\"}"
]

host-config-keys = ["Binds"]

# URL for connecting to the docker daemon
# host.docker.internal works for macOS and Windows.
# Linux could use --net=host in the `docker run` instruction or 172.17.0.1 in the URI below.
# To have Docker listening through tcp on macOS, install socat and run the following command
# socat -4 TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock
# Most simple approach, leave it as http://127.0.0.1:2375, and mount /var/run/docker.sock.
# 127.0.0.1 is used because internally the container uses socat when /var/run/docker.sock is mounted
# If var/run/docker.sock is not mounted:
# Windows: make sure Docker Desktop exposes the daemon via tcp, and use http://host.docker.internal:2375.
# macOS: install socat and run the following command, socat -4 TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock,
# then use http://host.docker.internal:2375.
# Linux: varies from machine to machine, please mount /var/run/docker.sock. If this does not work, please create an issue.

url = "http://host.docker.internal:2375"
# Docker image used for video recording
video-image = "selenium/video:latest"
Expand Down
5 changes: 3 additions & 2 deletions grid/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
version: "3"
services:
node-docker:
image: selenium/node-docker:latest
volumes:
- ./assets:/opt/selenium/assets
- ./config.toml:/opt/bin/config.toml
- ~/Downloads:/home/seluser/Downloads
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- selenium-hub
environment:
Expand All @@ -18,4 +19,4 @@ services:
ports:
- "4442:4442"
- "4443:4443"
- "4444:4444"
- "4444:4444"

0 comments on commit 1832f49

Please sign in to comment.