Dockerfile 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. apt-get install -y --no-install-recommends default-jre && \
  22. wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
  23. dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install && \
  24. rm google-chrome-stable_current_amd64.deb && \
  25. apt-get autoclean -y && \
  26. apt-get autoremove -y && \
  27. apt-get clean && \
  28. rm -rf /var/lib/apt/lists/*
  29. # Install Baangt
  30. RUN git clone -b master https://gogs.earthsquad.global/athos/baangt --single-branch && \
  31. pip3 install -r baangt/requirements.txt && \
  32. rm -rf baangt/browserDrivers && \
  33. mkdir baangt/browserDrivers && \
  34. cd baangt/browserDrivers && \
  35. wget http://selenium-release.storage.googleapis.com/4.0-alpha5/selenium-server-4.0.0-alpha-5.jar && \
  36. cd ../..
  37. WORKDIR /root/
  38. # VNC-Server
  39. RUN mkdir -p /root/.vnc
  40. COPY xstartup /root/.vnc/
  41. RUN chmod a+x /root/.vnc/xstartup
  42. RUN touch /root/.vnc/passwd && \
  43. /bin/bash -c "echo -e 'password\npassword\nn' | vncpasswd" > /root/.vnc/passwd && \
  44. chmod 400 /root/.vnc/passwd && \
  45. chmod go-rwx /root/.vnc && \
  46. touch /root/.Xauthority
  47. COPY start-vncserver.sh /root/
  48. COPY baangt.sh /root/
  49. COPY baangt.ini /baangt/
  50. RUN chmod a+x /root/start-vncserver.sh && \
  51. chmod a+x /root/baangt.sh && \
  52. echo "mycontainer" > /etc/hostname && \
  53. echo "127.0.0.1 localhost" > /etc/hosts && \
  54. echo "127.0.0.1 mycontainer" >> /etc/hosts
  55. WORKDIR /baangt/
  56. RUN python3 baangt.py --reloadDrivers=True
  57. EXPOSE 5901
  58. ENV USER root
  59. CMD [ "/root/start-vncserver.sh" ]