From 73e0c877b3eb001cf506978089846538e719226e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Perrot?= Date: Wed, 7 Jun 2017 11:47:26 +0200 Subject: [PATCH] Moving config generation in docker files This allow random users to launch the images. The behavior is needed for OpenShift. Cf. issue #3 from ddavison/selenium-openshift-templates --- NodeBase/entry_point.sh | 1 - NodeChrome/Dockerfile.txt | 3 +++ NodeDebug/entry_point.sh | 1 - NodeFirefox/Dockerfile.txt | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NodeBase/entry_point.sh b/NodeBase/entry_point.sh index 3518881ddb..c7f83d4b56 100755 --- a/NodeBase/entry_point.sh +++ b/NodeBase/entry_point.sh @@ -1,7 +1,6 @@ #!/bin/bash source /opt/bin/functions.sh -/opt/bin/generate_config > /opt/selenium/config.json export GEOMETRY="$SCREEN_WIDTH""x""$SCREEN_HEIGHT""x""$SCREEN_DEPTH" diff --git a/NodeChrome/Dockerfile.txt b/NodeChrome/Dockerfile.txt index 7885567724..bffa4d361f 100644 --- a/NodeChrome/Dockerfile.txt +++ b/NodeChrome/Dockerfile.txt @@ -39,3 +39,6 @@ COPY generate_config /opt/bin/generate_config # Chrome Launch Script Modification #================================= COPY chrome_launcher.sh /opt/google/chrome/google-chrome + +# Generating config inside the image rather than with entry_point.sh +RUN /opt/bin/generate_config > /opt/selenium/config.json diff --git a/NodeDebug/entry_point.sh b/NodeDebug/entry_point.sh index e73449efd8..29e42c793d 100755 --- a/NodeDebug/entry_point.sh +++ b/NodeDebug/entry_point.sh @@ -3,7 +3,6 @@ # IMPORTANT: Change this file only in directory NodeDebug! source /opt/bin/functions.sh -/opt/bin/generate_config > /opt/selenium/config.json export GEOMETRY="$SCREEN_WIDTH""x""$SCREEN_HEIGHT""x""$SCREEN_DEPTH" diff --git a/NodeFirefox/Dockerfile.txt b/NodeFirefox/Dockerfile.txt index 55c0ab91bc..c505910076 100644 --- a/NodeFirefox/Dockerfile.txt +++ b/NodeFirefox/Dockerfile.txt @@ -35,3 +35,6 @@ COPY generate_config /opt/bin/generate_config # To run a command as administrator (user "root"), use "sudo ". See "man sudo_root" for details. # When logging into the container RUN sudo echo "" + +# Generating config inside the image rather than with entry_point.sh +RUN /opt/bin/generate_config > /opt/selenium/config.json