Browse Source

chrome etc

bernhardbuhl 4 years ago
parent
commit
6b3beea6fe
7 changed files with 97 additions and 1 deletions
  1. 2 0
      .idea/.gitignore
  2. 12 0
      .idea/baangt-Docker.iml
  3. 6 0
      .idea/inspectionProfiles/profiles_settings.xml
  4. 12 0
      .idea/modules.xml
  5. 9 0
      .idea/vcs.xml
  6. 7 1
      Dockerfile
  7. 49 0
      google-chrome

+ 2 - 0
.idea/.gitignore

@@ -0,0 +1,2 @@
+# Default ignored files
+/workspace.xml

+ 12 - 0
.idea/baangt-Docker.iml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="PYTHON_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="baangtVIG" />
+    <orderEntry type="module" module-name="docker-android" />
+    <orderEntry type="module" module-name="baangt-Docker-Appium" />
+    <orderEntry type="module" module-name="android-container" />
+  </component>
+</module>

+ 6 - 0
.idea/inspectionProfiles/profiles_settings.xml

@@ -0,0 +1,6 @@
+<component name="InspectionProjectProfileManager">
+  <settings>
+    <option name="USE_PROJECT_PROFILE" value="false" />
+    <version value="1.0" />
+  </settings>
+</component>

+ 12 - 0
.idea/modules.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/../android-container/.idea/android-container.iml" filepath="$PROJECT_DIR$/../android-container/.idea/android-container.iml" />
+      <module fileurl="file://$PROJECT_DIR$/.idea/baangt-Docker.iml" filepath="$PROJECT_DIR$/.idea/baangt-Docker.iml" />
+      <module fileurl="file://$PROJECT_DIR$/../baangt-Docker-Appium/.idea/baangt-Docker-Appium.iml" filepath="$PROJECT_DIR$/../baangt-Docker-Appium/.idea/baangt-Docker-Appium.iml" />
+      <module fileurl="file://$PROJECT_DIR$/../baangtVIG/.idea/baangtVIG.iml" filepath="$PROJECT_DIR$/../baangtVIG/.idea/baangtVIG.iml" />
+      <module fileurl="file://$PROJECT_DIR$/../docker-android/.idea/docker-android.iml" filepath="$PROJECT_DIR$/../docker-android/.idea/docker-android.iml" />
+    </modules>
+  </component>
+</project>

+ 9 - 0
.idea/vcs.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs="Git" />
+    <mapping directory="$PROJECT_DIR$/../android-container" vcs="Git" />
+    <mapping directory="$PROJECT_DIR$/../baangt-Docker-Appium" vcs="Git" />
+    <mapping directory="$PROJECT_DIR$/../docker-android" vcs="Git" />
+  </component>
+</project>

+ 7 - 1
Dockerfile

@@ -22,7 +22,8 @@ RUN apt-get update -q && \
     apt-get install -y --no-install-recommends lxde tightvncserver xvfb dbus-x11 x11-utils && \
     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 libssl-dev git jq firefox unzip libxkbcommon-x11-0 && \
+    apt-get install -y --no-install-recommends gnumeric nano && \
     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,6 +34,7 @@ RUN apt-get update -q && \
 
 # Install Baangt
 RUN git clone -b master https://gogs.earthsquad.global/athos/baangt --single-branch && \
+    pip3 install --upgrade pip && \
     pip3 install -r baangt/requirements.txt
 
 WORKDIR /root/
@@ -55,6 +57,10 @@ RUN chmod a+x /root/start-vncserver.sh && \
     echo "127.0.0.1	localhost" > /etc/hosts && \
     echo "127.0.0.1	mycontainer" >> /etc/hosts
 
+# Copy the google-chrome setting (with --no-sandbox and -disable-gpu)
+COPY google-chrome /opt/google/chrome/
+RUN chmod a+x /opt/google/chrome/google-chrome
+
 WORKDIR /baangt
 RUN mkdir /baangt/browserDrivers
 RUN python3 baangt.py --reloadDrivers=True

+ 49 - 0
google-chrome

@@ -0,0 +1,49 @@
+#!/bin/bash
+#
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Let the wrapped binary know that it has been run through the wrapper.
+export CHROME_WRAPPER="`readlink -f "$0"`"
+
+HERE="`dirname "$CHROME_WRAPPER"`"
+
+# We include some xdg utilities next to the binary, and we want to prefer them
+# over the system versions when we know the system versions are very old. We
+# detect whether the system xdg utilities are sufficiently new to be likely to
+# work for us by looking for xdg-settings. If we find it, we leave $PATH alone,
+# so that the system xdg utilities (including any distro patches) will be used.
+if ! which xdg-settings &> /dev/null; then
+  # Old xdg utilities. Prepend $HERE to $PATH to use ours instead.
+  export PATH="$HERE:$PATH"
+else
+  # Use system xdg utilities. But first create mimeapps.list if it doesn't
+  # exist; some systems have bugs in xdg-mime that make it fail without it.
+  xdg_app_dir="${XDG_DATA_HOME:-$HOME/.local/share/applications}"
+  mkdir -p "$xdg_app_dir"
+  [ -f "$xdg_app_dir/mimeapps.list" ] || touch "$xdg_app_dir/mimeapps.list"
+fi
+
+# Always use our versions of ffmpeg libs.
+# This also makes RPMs find the compatibly-named library symlinks.
+if [[ -n "$LD_LIBRARY_PATH" ]]; then
+  LD_LIBRARY_PATH="$HERE:$HERE/lib:$LD_LIBRARY_PATH"
+else
+  LD_LIBRARY_PATH="$HERE:$HERE/lib"
+fi
+export LD_LIBRARY_PATH
+
+export CHROME_VERSION_EXTRA="stable"
+
+# We don't want bug-buddy intercepting our crashes. http://crbug.com/24120
+export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME
+
+# Sanitize std{in,out,err} because they'll be shared with untrusted child
+# processes (http://crbug.com/376567).
+exec < /dev/null
+exec > >(exec cat)
+exec 2> >(exec cat >&2)
+
+# Note: exec -a below is a bashism.
+exec -a "$0" "$HERE/chrome" "$@" --no-sandbox -disable-gpu