You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,7 @@ Talk to us at https://www.selenium.dev/support/
42
42
*[Video recording and uploading](#video-recording-and-uploading)
43
43
*[Dynamic Grid](#dynamic-grid)
44
44
*[Configuration example](#configuration-example)
45
+
*[Share volumes config of Dynamic Grid container to node browser containers](#share-volumes-config-of-dynamic-grid-container-to-node-browser-containers)
45
46
*[Execution with Hub & Node roles](#execution-with-hub--node-roles)
46
47
*[Execution with Standalone roles](#execution-with-standalone-roles)
47
48
*[Using Dynamic Grid in different machines/VMs](#using-dynamic-grid-in-different-machinesvms)
@@ -745,6 +746,36 @@ With the optional config key `host-config-keys` under section [docker] in a conf
745
746
746
747
Valid key names for Docker host config can be found in the Docker API [documentation](https://docs.docker.com/engine/api/latest/#tag/Container/operation/ContainerCreate) or via the command `docker inspect` the node-docker container.
747
748
749
+
### Share volumes config of Dynamic Grid container to node browser containers
750
+
751
+
In case you want to access download directory in node browser containers (e.g `/home/seluser/Downloads`) via volumes config of Dynamic Grid container, you can add the following config to the `config.toml` file
752
+
753
+
```toml
754
+
[docker]
755
+
host-config-keys = ["Binds"]
756
+
```
757
+
758
+
Volumes config in docker compose file
759
+
760
+
```dockerfile
761
+
services:
762
+
node-docker:
763
+
image: selenium/node-docker:latest
764
+
volumes:
765
+
- ./assets:/opt/selenium/assets
766
+
- ./config.toml:/opt/selenium/docker.toml
767
+
- ./downloads:/home/seluser/Downloads
768
+
- /var/run/docker.sock:/var/run/docker.sock
769
+
environment:
770
+
- SE_NODE_DOCKER_CONFIG_FILENAME=docker.toml
771
+
```
772
+
773
+
`/opt/selenium/config.toml`is the default path for the config file in all images. Once volumes config is shared to node browser containers, its `config.toml` could be overwritten by node-docker container config file.
774
+
775
+
In this case, mount your `config.toml` file to `/opt/selenium/docker.toml` in node-docker container. And set the environment variable `SE_NODE_DOCKER_CONFIG_FILENAME=docker.toml` to specify that config file name for the startup script.
776
+
777
+
Refer to example [docker-compose-v3-test-node-docker.yaml](./tests/docker-compose-v3-test-node-docker.yaml)
778
+
748
779
### Execution with Hub & Node roles
749
780
750
781
This can be expanded to a full Grid deployment, all components deployed individually. The overall
0 commit comments