Dockerfile 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. FROM ubuntu:18.04
  2. MAINTAINER Bernhard Buhl <buhl@buhl-consulting.com.cy>
  3. RUN echo "Europe/Rome" > /etc/timezone
  4. RUN apt-get update -q && \
  5. export DEBIAN_FRONTEND=noninteractive && \
  6. apt-get install -y --no-install-recommends tzdata
  7. RUN dpkg-reconfigure -f noninteractive tzdata
  8. # Install packages
  9. RUN apt-get update -q && \
  10. export DEBIAN_FRONTEND=noninteractive && \
  11. apt-get install -y --no-install-recommends software-properties-common && \
  12. add-apt-repository universe && \
  13. apt-get update -q && \
  14. apt-get remove -y python3.6 && \
  15. apt-get install -y --no-install-recommends wget curl rsync netcat mg vim bzip2 zip unzip && \
  16. apt-get install -y --no-install-recommends libx11-6 libxcb1 libxau6 jq python3-setuptools python3-tk && \
  17. apt-get install -y --no-install-recommends lxde tightvncserver xvfb dbus-x11 x11-utils && \
  18. apt-get install -y --no-install-recommends xfonts-base xfonts-75dpi xfonts-100dpi && \
  19. apt-get install -y --no-install-recommends python-pip python3.7-dev python-qt4 python3-pip tk-dev && \
  20. apt-get install -y --no-install-recommends libssl-dev git jq firefox unzip && \
  21. wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
  22. dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install && \
  23. rm google-chrome-stable_current_amd64.deb && \
  24. apt-get autoclean -y && \
  25. apt-get autoremove -y && \
  26. apt-get clean && \
  27. apt-get -qqy install nodejs\
  28. apt install npm\
  29. rm -rf /var/lib/apt/lists/*
  30. # Install Baangt
  31. RUN git clone https://gogs.earthsquad.global/athos/baangt && \
  32. pip3 install -r baangt/requirements.txt \
  33. #=============================================
  34. # Install Android SDK's and Platform tools
  35. #=============================================
  36. RUN export DEBIAN_FRONTEND=noninteractive \
  37. && dpkg --add-architecture i386 \
  38. && apt-get update -y \
  39. && apt-get -y --no-install-recommends install \
  40. libc6-i386 \
  41. lib32stdc++6 \
  42. lib32gcc1 \
  43. lib32ncurses5 \
  44. lib32z1 \
  45. wget \
  46. curl \
  47. unzip \
  48. openjdk-7-jre-headless \
  49. && wget --progress=dot:giga -O /opt/adt.tgz \
  50. https://dl.google.com/android/android-sdk_r24.3.4-linux.tgz \
  51. && tar xzf /opt/adt.tgz -C /opt \
  52. && rm /opt/adt.tgz \
  53. && echo y | /opt/android-sdk-linux/tools/android update sdk --all --filter platform-tools,build-tools-23.0.1 --no-ui --force \
  54. && apt-get -qqy clean \
  55. && rm -rf /var/cache/apt/*
  56. #================================
  57. # Set up PATH for Android Tools
  58. #================================
  59. ENV PATH $PATH:/opt/android-sdk-linux/platform-tools:/opt/android-sdk-linux/tools
  60. ENV ANDROID_HOME /opt/android-sdk-linux
  61. #==========================
  62. # Install Appium Dependencies
  63. #==========================
  64. RUN curl -sL https://deb.nodesource.com/setup_0.12 | bash - \
  65. && apt-get -qqy install \
  66. python \
  67. make \
  68. build-essential \
  69. g++
  70. #=====================
  71. # Install Appium
  72. #=====================
  73. ENV APPIUM_VERSION 1.4.16
  74. RUN mkdir /opt/appium \
  75. && cd /opt/appium \
  76. && npm install appium@$APPIUM_VERSION \
  77. && ln -s /opt/appium/node_modules/.bin/appium /usr/bin/appium
  78. EXPOSE 4723
  79. WORKDIR /root/
  80. # VNC-Server
  81. RUN mkdir -p /root/.vnc
  82. COPY xstartup /root/.vnc/
  83. RUN chmod a+x /root/.vnc/xstartup
  84. RUN touch /root/.vnc/passwd && \
  85. /bin/bash -c "echo -e 'password\npassword\nn' | vncpasswd" > /root/.vnc/passwd && \
  86. chmod 400 /root/.vnc/passwd && \
  87. chmod go-rwx /root/.vnc && \
  88. touch /root/.Xauthority
  89. COPY start-vncserver.sh /root/
  90. COPY baangt.sh /root/
  91. COPY getdrivers.sh /root/
  92. RUN chmod a+x /root/start-vncserver.sh && \
  93. chmod a+x /root/baangt.sh && \
  94. chmod a+x /root/getdrivers.sh && \
  95. /root/getdrivers.sh && \
  96. echo "mycontainer" > /etc/hostname && \
  97. echo "127.0.0.1 localhost" > /etc/hosts && \
  98. echo "127.0.0.1 mycontainer" >> /etc/hosts
  99. EXPOSE 5901
  100. ENV USER root
  101. CMD [ "/root/start-vncserver.sh" ]
  102. #==========================
  103. # Run appium as default
  104. #==========================
  105. CMD /usr/bin/appium