Skip to content

Commit 17dc143

Browse files
committed
Final adjustments to the README for Grid 4 [skip ci]
1 parent 310ed2b commit 17dc143

File tree

1 file changed

+22
-36
lines changed

1 file changed

+22
-36
lines changed

README.md

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -348,51 +348,36 @@ ___
348348

349349
## Debugging
350350

351-
In the event you wish to visually see what the browser is doing you will want to run the `debug` variant of node or standalone images. A VNC server will run on port 5900. You are free to map that to any free external port that you wish. Keep in mind that you will only be able to run one node per port so if you wish to include a second node, or more, you will have to use different ports, the 5900 as the internal port will have to remain the same though as thats the VNC service on the node. The second example below shows how to run multiple nodes and with different VNC ports open:
352-
``` bash
353-
$ docker run -d -P -p <port4VNC>:5900 --link selenium-hub:hub -v /dev/shm:/dev/shm selenium/node-chrome:4.0.0-alpha-6-20200730
354-
$ docker run -d -P -p <port4VNC>:5900 --link selenium-hub:hub -v /dev/shm:/dev/shm selenium/node-firefox:4.0.0-alpha-6-20200730
355-
$ docker run -d -P -p <port4VNC>:5900 --link selenium-hub:hub -v /dev/shm:/dev/shm selenium/node-opera:4.0.0-alpha-6-20200730
356-
```
357-
e.g.:
358-
``` bash
359-
$ docker run -d -P -p 5900:5900 --link selenium-hub:hub -v /dev/shm:/dev/shm selenium/node-chrome:4.0.0-alpha-6-20200730
360-
$ docker run -d -P -p 5901:5900 --link selenium-hub:hub -v /dev/shm:/dev/shm selenium/node-firefox:4.0.0-alpha-6-20200730
361-
$ docker run -d -P -p 5900:5900 --link selenium-hub:hub -v /dev/shm:/dev/shm selenium/node-opera:4.0.0-alpha-6-20200730
362-
```
363-
to connect to the Chrome node on 5900 and the Firefox node on 5901 (assuming those nodes are free, and reachable).
351+
In the event you wish to see what the browser is doing, you can check what is going inside by connecting to the VNC
352+
server running on port 5900 inside the browser container.
364353

365-
And for standalone:
366-
``` bash
367-
$ docker run -d -p 4444:4444 -p <port4VNC>:5900 -v /dev/shm:/dev/shm selenium/standalone-chrome:4.0.0-alpha-6-20200730
368-
# OR
369-
$ docker run -d -p 4444:4444 -p <port4VNC>:5900 -v /dev/shm:/dev/shm selenium/standalone-firefox:4.0.0-alpha-6-20200730
370-
# OR
371-
$ docker run -d -p 4444:4444 -p <port4VNC>:5900 -v /dev/shm:/dev/shm selenium/standalone-opera:4.0.0-alpha-6-20200730
372-
```
373-
or
354+
You are free to map that port to any free external port that you wish. Keep in mind that you will only be able to run
355+
one node per port. If you wish to include a second node (or more), you will have to use different ports.
356+
357+
The internal 5900 port will need to remain the same because that is the configured port for the VNC server
358+
running inside the container.
359+
360+
Here is an example with the standalone images, the same concept applies to the node images.
374361
``` bash
375362
$ docker run -d -p 4444:4444 -p 5900:5900 -v /dev/shm:/dev/shm selenium/standalone-chrome:4.0.0-alpha-6-20200730
376-
# OR
377363
$ docker run -d -p 4444:4444 -p 5901:5900 -v /dev/shm:/dev/shm selenium/standalone-firefox:4.0.0-alpha-6-20200730
378-
# OR
379-
$ docker run -d -p 4444:4444 -p 5900:5900 -v /dev/shm:/dev/shm selenium/standalone-opera:4.0.0-alpha-6-20200730
364+
$ docker run -d -p 4444:4444 -p 5902:5900 -v /dev/shm:/dev/shm selenium/standalone-opera:4.0.0-alpha-6-20200730
380365
```
381366

382-
You can acquire the port that the VNC server is exposed to by running:
383-
(Assuming that we mapped the ports like this: 49338:5900)
384-
``` bash
385-
$ docker port <container-name|container-id> 5900
386-
#=> 0.0.0.0:49338
387-
```
367+
Then, you would use in your VNC client:
368+
- Port 5900 to connect to the Chrome container
369+
- Port 5901 to connect to the Firefox container
370+
- Port 5902 to connect to the Opera container
388371

389-
In case you have [RealVNC](https://www.realvnc.com/) binary `vnc` in your path, you can always take a look, view only to avoid messing around your tests with an unintended mouse click or keyboard interrupt:
372+
In case you have [RealVNC](https://www.realvnc.com/) binary `vnc` in your path, you can always take a look, select view
373+
only to avoid messing around your tests with an unintended mouse click or keyboard interrupt:
390374
``` bash
391-
$ ./bin/vncview 127.0.0.1:49338
375+
$ ./bin/vncview 127.0.0.1:5900
392376
```
393377

394-
When you are prompted for the password it is `secret`. If you wish to change this then you should either change it in the `/NodeBase/Dockerfile`
395-
and build the images yourself, or you can define a Docker image that derives from the posted ones which reconfigures it:
378+
When you are prompted for the password it is `secret`. If you wish to change this then you should either change
379+
it in the `/NodeBase/Dockerfile` and build the images yourself, or you can define a Docker image that derives from
380+
the posted ones which reconfigures it:
396381
``` dockerfile
397382
#FROM selenium/node-chrome:4.0.0-alpha-6-20200730
398383
#FROM selenium/node-firefox:4.0.0-alpha-6-20200730
@@ -428,4 +413,5 @@ or
428413

429414
`Message: unknown error: Chrome failed to start: exited abnormally`
430415

431-
The reason _might_ be that you've set the `START_XVFB` environment variable to "false", but forgot to actually run Firefox, Chrome or Opera (respectively) in headless mode.
416+
The reason _might_ be that you've set the `START_XVFB` environment variable to "false", but forgot to
417+
actually run Firefox, Chrome or Opera in headless mode.

0 commit comments

Comments
 (0)