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
{{ message }}
This repository was archived by the owner on Jun 30, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: docs/docker-compose.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,42 @@ You can now run your tests by using the `--seleniumUrl="http://localhost:4444/wd
34
34
However if your web application under test is running in localhost, e.g. `--appHost=localhost` or is publicly not accessible
35
35
you should instead either dockerize your application as shown in the example [adwords_mock](https://github.com/elgalu/google_adwords_mock) within the [docker-compose-tests.yml][]. Its there shown as another [service](https://docs.docker.com/compose/compose-file/#/service-configuration-reference). Another option (if you don't want to dockerize your app yet) is to somehow replace `--appHost=localhost` with `--appHost=d.host.loc.dev` in the config file of your testing framework. The string `d.host.loc.dev` is a place holder inside the docker container that points to the IP of your localhost.
36
36
37
+
## Docker Swarm mode
38
+
You might get the following error if you try to run a `SELENIUM_NODE` as part of a Swarm stack:
39
+
```
40
+
$ docker stack deploy selenium
41
+
Updating service selenium_selenium-chrome (id: joru9fw8xej2imcrvgblcrc85)
42
+
failed to create service selenium_selenium-chrome: Error response from daemon: rpc error: code = InvalidArgument desc = expanding env failed: expanding env "SELENIUM_NODE_HOST={{CONTAINER_IP}}": template: expansion:1: function "CONTAINER_IP" not defined
43
+
```
44
+
Thanks to https://github.com/elgalu/docker-selenium/issues/236 you just have to update your variable `SELENIUM_NODE_HOST` to `{{__CONTAINER_IP__}}`.
0 commit comments