diff --git a/Hub/Dockerfile b/Hub/Dockerfile index e623506d13..5ab08f226d 100644 --- a/Hub/Dockerfile +++ b/Hub/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/base:2.53.1 +FROM selenium/base:2.53.1-americium MAINTAINER Selenium #======================== diff --git a/Makefile b/Makefile index 4541fdd767..a911f685f6 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ chrome: nodebase generate_chrome cd ./NodeChrome && docker build $(BUILD_ARGS) -t $(NAME)/node-chrome:$(VERSION) . generate_firefox: - cd ./NodeFirefox && ./generate.sh $(VERSION) + cd ./NodeFirefox && ./generate.sh $(VERSION) firefox: nodebase generate_firefox cd ./NodeFirefox && docker build $(BUILD_ARGS) -t $(NAME)/node-firefox:$(VERSION) . diff --git a/NodeBase/Dockerfile b/NodeBase/Dockerfile index 5febc6cd4e..d866c8b69d 100644 --- a/NodeBase/Dockerfile +++ b/NodeBase/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/base:2.53.1 +FROM selenium/base:2.53.1-americium MAINTAINER Selenium ENV DEBIAN_FRONTEND noninteractive diff --git a/NodeBase/entry_point.sh b/NodeBase/entry_point.sh index 0231d08f68..8156e30eed 100644 --- a/NodeBase/entry_point.sh +++ b/NodeBase/entry_point.sh @@ -1,6 +1,7 @@ #!/bin/bash source /opt/bin/functions.sh +/opt/selenium/generate_config > /opt/selenium/config.json export GEOMETRY="$SCREEN_WIDTH""x""$SCREEN_HEIGHT""x""$SCREEN_DEPTH" diff --git a/NodeChrome/Dockerfile b/NodeChrome/Dockerfile index ccc2878e08..77657351fe 100644 --- a/NodeChrome/Dockerfile +++ b/NodeChrome/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/node-base:2.53.1 +FROM selenium/node-base:2.53.1-americium MAINTAINER Selenium USER root @@ -17,7 +17,7 @@ USER root # latest (equivalent to google-chrome-stable) # google-chrome-beta (pull latest beta) #============================================ -ENV CHROME_VERSION "google-chrome-stable" +ARG CHROME_VERSION="google-chrome-stable" RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ && echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \ && apt-get update -qqy \ @@ -29,7 +29,7 @@ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key #================== # Chrome webdriver #================== -ENV CHROME_DRIVER_VERSION 2.24 +ARG CHROME_DRIVER_VERSION=2.24 RUN wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip \ && rm -rf /opt/selenium/chromedriver \ && unzip /tmp/chromedriver_linux64.zip -d /opt/selenium \ @@ -41,7 +41,11 @@ RUN wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.stor #======================== # Selenium Configuration #======================== -COPY config.json /opt/selenium/config.json +ENV NODE_MAX_INSTANCES 1 +ENV NODE_MAX_SESSION 1 +ENV NODE_REGISTER_CYCLE 5000 +COPY generate_config /opt/selenium/generate_config +RUN chmod +x /opt/selenium/generate_config #================================= # Chrome Launch Script Modication @@ -49,6 +53,8 @@ COPY config.json /opt/selenium/config.json COPY chrome_launcher.sh /opt/google/chrome/google-chrome RUN chmod +x /opt/google/chrome/google-chrome +RUN chown -R seluser:seluser /opt/selenium + USER seluser # Following line fixes # https://github.com/SeleniumHQ/docker-selenium/issues/87 diff --git a/NodeChrome/Dockerfile.txt b/NodeChrome/Dockerfile.txt index f5eae71bfe..85cfba651b 100644 --- a/NodeChrome/Dockerfile.txt +++ b/NodeChrome/Dockerfile.txt @@ -12,7 +12,7 @@ USER root # latest (equivalent to google-chrome-stable) # google-chrome-beta (pull latest beta) #============================================ -ENV CHROME_VERSION "google-chrome-stable" +ARG CHROME_VERSION="google-chrome-stable" RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ && echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \ && apt-get update -qqy \ @@ -24,7 +24,7 @@ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key #================== # Chrome webdriver #================== -ENV CHROME_DRIVER_VERSION 2.24 +ARG CHROME_DRIVER_VERSION=2.24 RUN wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip \ && rm -rf /opt/selenium/chromedriver \ && unzip /tmp/chromedriver_linux64.zip -d /opt/selenium \ @@ -36,7 +36,11 @@ RUN wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.stor #======================== # Selenium Configuration #======================== -COPY config.json /opt/selenium/config.json +ENV NODE_MAX_INSTANCES 1 +ENV NODE_MAX_SESSION 1 +ENV NODE_REGISTER_CYCLE 5000 +COPY generate_config /opt/selenium/generate_config +RUN chmod +x /opt/selenium/generate_config #================================= # Chrome Launch Script Modication @@ -44,6 +48,8 @@ COPY config.json /opt/selenium/config.json COPY chrome_launcher.sh /opt/google/chrome/google-chrome RUN chmod +x /opt/google/chrome/google-chrome +RUN chown -R seluser:seluser /opt/selenium + USER seluser # Following line fixes # https://github.com/SeleniumHQ/docker-selenium/issues/87 diff --git a/NodeChrome/config.json b/NodeChrome/config.json deleted file mode 100644 index edb4cf69e2..0000000000 --- a/NodeChrome/config.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "capabilities": [ - { - "browserName": "*googlechrome", - "maxInstances": 1, - "seleniumProtocol": "Selenium" - }, - { - "browserName": "chrome", - "maxInstances": 1, - "seleniumProtocol": "WebDriver" - } - ], - "configuration": { - "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy", - "maxSession": 1, - "port": 5555, - "register": true, - "registerCycle": 5000 - } -} diff --git a/NodeChrome/generate_config b/NodeChrome/generate_config new file mode 100755 index 0000000000..360bffab46 --- /dev/null +++ b/NodeChrome/generate_config @@ -0,0 +1,25 @@ +#!/bin/bash + +echo " +{ + \"capabilities\": [ + { + \"browserName\": \"*googlechrome\", + \"maxInstances\": $NODE_MAX_INSTANCES, + \"seleniumProtocol\": \"Selenium\" + }, + { + \"browserName\": \"chrome\", + \"maxInstances\": $NODE_MAX_INSTANCES, + \"seleniumProtocol\": \"WebDriver\" + } + ], + \"configuration\": { + \"proxy\": \"org.openqa.grid.selenium.proxy.DefaultRemoteProxy\", + \"maxSession\": $NODE_MAX_SESSION, + \"port\": 5555, + \"register\": true, + \"registerCycle\": $NODE_REGISTER_CYCLE + } +}" + diff --git a/NodeChromeDebug/Dockerfile b/NodeChromeDebug/Dockerfile index 8b8d49f7ea..76df11e06e 100644 --- a/NodeChromeDebug/Dockerfile +++ b/NodeChromeDebug/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/node-chrome:2.53.1 +FROM selenium/node-chrome:2.53.1-americium MAINTAINER Selenium USER root diff --git a/NodeChromeDebug/entry_point.sh b/NodeChromeDebug/entry_point.sh index f457cbc9e2..f5a98b71c5 100644 --- a/NodeChromeDebug/entry_point.sh +++ b/NodeChromeDebug/entry_point.sh @@ -1,6 +1,7 @@ #!/bin/bash source /opt/bin/functions.sh +/opt/selenium/generate_config > /opt/selenium/config.json export GEOMETRY="$SCREEN_WIDTH""x""$SCREEN_HEIGHT""x""$SCREEN_DEPTH" diff --git a/NodeFirefox/Dockerfile b/NodeFirefox/Dockerfile index ac26aba4a3..d47da54d24 100644 --- a/NodeFirefox/Dockerfile +++ b/NodeFirefox/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/node-base:2.53.1 +FROM selenium/node-base:2.53.1-americium MAINTAINER Selenium USER root @@ -38,6 +38,11 @@ RUN wget --no-verbose -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geck #======================== # Selenium Configuration #======================== -COPY config.json /opt/selenium/config.json +ENV NODE_MAX_INSTANCES 1 +ENV NODE_MAX_SESSION 1 +ENV NODE_REGISTER_CYCLE 5000 +COPY generate_config /opt/selenium/generate_config +RUN chmod +x /opt/selenium/generate_config \ + && chown -R seluser:seluser /opt/selenium USER seluser diff --git a/NodeFirefox/Dockerfile.txt b/NodeFirefox/Dockerfile.txt index a9732eb6ad..bb1e8da4b6 100644 --- a/NodeFirefox/Dockerfile.txt +++ b/NodeFirefox/Dockerfile.txt @@ -33,6 +33,11 @@ RUN wget --no-verbose -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geck #======================== # Selenium Configuration #======================== -COPY config.json /opt/selenium/config.json +ENV NODE_MAX_INSTANCES 1 +ENV NODE_MAX_SESSION 1 +ENV NODE_REGISTER_CYCLE 5000 +COPY generate_config /opt/selenium/generate_config +RUN chmod +x /opt/selenium/generate_config \ + && chown -R seluser:seluser /opt/selenium USER seluser diff --git a/NodeFirefox/config.json b/NodeFirefox/config.json deleted file mode 100644 index cb1f58a366..0000000000 --- a/NodeFirefox/config.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "capabilities": [ - { - "browserName": "*firefox", - "maxInstances": 1, - "seleniumProtocol": "Selenium" - }, - { - "browserName": "firefox", - "maxInstances": 1, - "seleniumProtocol": "WebDriver" - } - ], - "configuration": { - "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy", - "maxSession": 1, - "port": 5555, - "register": true, - "registerCycle": 5000 - } -} diff --git a/NodeFirefox/generate_config b/NodeFirefox/generate_config new file mode 100755 index 0000000000..4ccab1c427 --- /dev/null +++ b/NodeFirefox/generate_config @@ -0,0 +1,25 @@ +#!/bin/bash + +echo " +{ + \"capabilities\": [ + { + \"browserName\": \"*firefox\", + \"maxInstances\": $NODE_MAX_INSTANCES, + \"seleniumProtocol\": \"Selenium\" + }, + { + \"browserName\": \"firefox\", + \"maxInstances\": $NODE_MAX_INSTANCES, + \"seleniumProtocol\": \"WebDriver\" + } + ], + \"configuration\": { + \"proxy\": \"org.openqa.grid.selenium.proxy.DefaultRemoteProxy\", + \"maxSession\": $NODE_MAX_SESSION, + \"port\": 5555, + \"register\": true, + \"registerCycle\": $NODE_REGISTER_CYCLE + } +}" + diff --git a/NodeFirefoxDebug/Dockerfile b/NodeFirefoxDebug/Dockerfile index fca0b2b9f7..a30cbf6347 100644 --- a/NodeFirefoxDebug/Dockerfile +++ b/NodeFirefoxDebug/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/node-firefox:2.53.1 +FROM selenium/node-firefox:2.53.1-americium MAINTAINER Selenium USER root diff --git a/NodeFirefoxDebug/entry_point.sh b/NodeFirefoxDebug/entry_point.sh index f457cbc9e2..f5a98b71c5 100644 --- a/NodeFirefoxDebug/entry_point.sh +++ b/NodeFirefoxDebug/entry_point.sh @@ -1,6 +1,7 @@ #!/bin/bash source /opt/bin/functions.sh +/opt/selenium/generate_config > /opt/selenium/config.json export GEOMETRY="$SCREEN_WIDTH""x""$SCREEN_HEIGHT""x""$SCREEN_DEPTH" diff --git a/StandaloneChrome/Dockerfile b/StandaloneChrome/Dockerfile index eed96f2ec0..39963d1f94 100644 --- a/StandaloneChrome/Dockerfile +++ b/StandaloneChrome/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/node-chrome:2.53.1 +FROM selenium/node-chrome:2.53.1-americium MAINTAINER Selenium USER root diff --git a/StandaloneChromeDebug/Dockerfile b/StandaloneChromeDebug/Dockerfile index a7e806cf46..22a99d1724 100644 --- a/StandaloneChromeDebug/Dockerfile +++ b/StandaloneChromeDebug/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/standalone-chrome:2.53.1 +FROM selenium/standalone-chrome:2.53.1-americium MAINTAINER Selenium USER root diff --git a/StandaloneFirefox/Dockerfile b/StandaloneFirefox/Dockerfile index 84ef847a14..12e3c9a922 100644 --- a/StandaloneFirefox/Dockerfile +++ b/StandaloneFirefox/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/node-firefox:2.53.1 +FROM selenium/node-firefox:2.53.1-americium MAINTAINER Selenium USER root diff --git a/StandaloneFirefoxDebug/Dockerfile b/StandaloneFirefoxDebug/Dockerfile index 444e300b58..54b9279b7b 100644 --- a/StandaloneFirefoxDebug/Dockerfile +++ b/StandaloneFirefoxDebug/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/standalone-firefox:2.53.1 +FROM selenium/standalone-firefox:2.53.1-americium MAINTAINER Selenium USER root