From 1f2923c77d07956c7ca7612c11fc3251dabe5a2e Mon Sep 17 00:00:00 2001 From: Stenver Date: Sat, 2 Apr 2016 18:19:08 +0300 Subject: [PATCH] Add workaround to chrome hanging issue on start --- README.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4c3ba43a26..16359516c3 100644 --- a/README.md +++ b/README.md @@ -22,14 +22,23 @@ Images included: ## Running the images -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. - -``` bash -$ docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-chrome:2.52.0 -``` +### Chrome workarounds +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. This is a workaround to node-chrome crash in docker container issue: https://code.google.com/p/chromium/issues/detail?id=519952 +In addition, add an environmental variable that directs DBUS to /dev/null - `DBUS_SESSION_BUS_ADDRESS=/dev/null`. This is a workaround for chrome starting issue: +https://github.com/SeleniumHQ/docker-selenium/issues/87 + +These fixes should be done for both standalone and GRID nodes. +For standalone: +``` bash +$ docker run -d -p 4444:4444 --env DBUS_SESSION_BUS_ADDRESS=/dev/null -v /dev/shm:/dev/shm selenium/standalone-chrome:2.52.0 +``` +For grid node: +``` bash +$ docker run -d -d --link selenium-hub:hub --env DBUS_SESSION_BUS_ADDRESS=/dev/null -v /dev/shm:/dev/shm selenium/node-chrome:2.52.0 +``` ### Standalone Chrome and Firefox