Skip to content

Commit e0caf81

Browse files
authored
Merge pull request #221 from zypherman/master
Clarifying documenting around port mapping for the VNC service
2 parents 2da88aa + b05735c commit e0caf81

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ Images included:
2121
- __selenium/node-firefox-debug__: Selenium node with Firefox installed and runs a VNC server, needs to be connected to a Selenium Grid Hub
2222

2323
## Running the images
24-
24+
2525
When executing docker run for an image with chrome browser please add volume mount `-v /dev/shm:/dev/shm` to use the host's shared memory.
2626

2727
``` bash
2828
$ docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-chrome:2.53.1
2929
```
3030

31-
This is a workaround to node-chrome crash in docker container issue: https://code.google.com/p/chromium/issues/detail?id=519952
31+
This is a workaround to node-chrome crash in docker container issue: https://code.google.com/p/chromium/issues/detail?id=519952
3232

3333

3434
### Standalone Chrome and Firefox
@@ -122,7 +122,7 @@ _Note: Since a Docker container is not meant to preserve state and spawning a ne
122122

123123
## Debugging
124124

125-
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 (substitute a free port that you wish to connect to on VNC for <port4VNC>; 5900 is fine if it is free, but of course you can only run one node on that port):
125+
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. Example: <port4VNC>: 5900) you will only be able to run 1 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:
126126
``` bash
127127
$ docker run -d -P -p <port4VNC>:5900 --link selenium-hub:hub selenium/node-chrome-debug:2.53.1
128128
$ docker run -d -P -p <port4VNC>:5900 --link selenium-hub:hub selenium/node-firefox-debug:2.53.1
@@ -135,7 +135,7 @@ $ docker run -d -P -p 5901:5900 --link selenium-hub:hub selenium/node-firefox-de
135135

136136
to connect to the Chrome node on 5900 and the Firefox node on 5901 (assuming those node are free, and reachable).
137137

138-
And for standalone:
138+
And for standalone:
139139
``` bash
140140
$ docker run -d -p 4444:4444 -p <port4VNC>:5900 selenium/standalone-chrome-debug:2.53.1
141141
# OR
@@ -149,6 +149,7 @@ $ docker run -d -p 4444:4444 -p 5901:5900 selenium/standalone-firefox-debug:2.53
149149
```
150150

151151
You can acquire the port that the VNC server is exposed to by running:
152+
(In this case our port mapping looks like 49338:5900 for our node)
152153
``` bash
153154
$ docker port <container-name|container-id> 5900
154155
#=> 0.0.0.0:49338

0 commit comments

Comments
 (0)