Browse Source

for selenium grid v4

George 7 months ago
parent
commit
b549130f3b
3 changed files with 28 additions and 2 deletions
  1. 11 0
      .project
  2. 16 2
      Dockerfile
  3. 1 0
      start-vncserver.sh

+ 11 - 0
.project

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>baangt-Docker</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>

+ 16 - 2
Dockerfile

@@ -32,8 +32,22 @@ RUN apt-get update -q && \
     rm -rf /var/lib/apt/lists/*
 
 # Install Baangt
-RUN git clone https://gogs.earthsquad.global/athos/baangt && \
-    pip3 install -r baangt/requirements.txt
+RUN git clone -b baangt-selenium-grid-v4 https://gogs.earthsquad.global/athos/baangt && \
+    pip3 install -r baangt/requirements.txt && \
+    rm -rf baangt/browserDrivers && \
+    mkdir baangt/browserDrivers && \
+    cd baangt/browserDrivers && \
+    wget http://selenium-release.storage.googleapis.com/4.0-alpha5/selenium-server-4.0.0-alpha-5.jar && \
+    BASE_URL=https://chromedriver.storage.googleapis.com && \
+    VERSION=$(curl -sL "$BASE_URL/LATEST_RELEASE") && \
+    curl -sL "$BASE_URL/$VERSION/chromedriver_linux64.zip" -o chromedriver.zip && \
+    unzip chromedriver.zip && \
+    GECKODRIVER_VERSION=`curl https://github.com/mozilla/geckodriver/releases/latest | grep -Po 'v[0-9]+.[0-9]+.[0-9]+'` && \
+    wget https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVER_VERSION/geckodriver-$GECKODRIVER_VERSION-linux64.tar.gz && \
+    tar -zxf geckodriver-$GECKODRIVER_VERSION-linux64.tar.gz && \
+    chmod +x geckodriver && \
+    rm geckodriver-$GECKODRIVER_VERSION-linux64.tar.gz && \
+    cd ../..
 
 WORKDIR /root/
 

+ 1 - 0
start-vncserver.sh

@@ -3,4 +3,5 @@
 echo "starting VNC server ..."
 export USER=root
 alias python=python3
+java -jar baangt/browserDrivers/selenium-server-4.0.0-alpha-5.jar standalone &
 vncserver :1 -geometry 1280x800 -depth 24 && tail -F /root/.vnc/*.log