Browse Source

first commit

George 7 months ago
parent
commit
9fba9e10a5
2 changed files with 19 additions and 1 deletions
  1. 1 0
      .gitignore
  2. 18 1
      Dockerfile

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+/.project

+ 18 - 1
Dockerfile

@@ -23,6 +23,7 @@ RUN apt-get update -q && \
     apt-get install -y --no-install-recommends xfonts-base xfonts-75dpi xfonts-100dpi && \
     apt-get install -y --no-install-recommends python-pip python3.7-dev python-qt4 python3-pip tk-dev && \
     apt-get install -y --no-install-recommends libssl-dev git jq firefox unzip && \
+    apt-get install -y --no-install-recommends default-jre && \
     wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
     dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install && \
     rm google-chrome-stable_current_amd64.deb && \
@@ -33,7 +34,21 @@ RUN apt-get update -q && \
 
 # Install Baangt
 RUN git clone https://gogs.earthsquad.global/athos/baangt && \
-    pip3 install -r baangt/requirements.txt
+    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/
 
@@ -61,3 +76,5 @@ RUN chmod a+x /root/start-vncserver.sh && \
 EXPOSE 5901
 ENV USER root
 CMD [ "/root/start-vncserver.sh" ]
+
+RUN java -jar baangt/browserDrivers/selenium-server-4.0.0-alpha-5.jar standalone