Dockerfile 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 libxkbcommon-x11-0 && \
  21. apt-get install -y --no-install-recommends gnumeric nano && \
  22. apt-get install -y --no-install-recommends default-jdk gcc python3-dev && \
  23. wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
  24. dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install && \
  25. rm google-chrome-stable_current_amd64.deb && \
  26. apt-get autoclean -y && \
  27. apt-get autoremove -y && \
  28. apt-get clean && \
  29. rm -rf /var/lib/apt/lists/*
  30. # Install Baangt
  31. RUN git clone -b master https://gogs.earthsquad.global/athos/baangt --single-branch && \
  32. pip3 install --upgrade pip && \
  33. pip3 install -r baangt/requirements.txt
  34. WORKDIR /root/
  35. # VNC-Server
  36. RUN mkdir -p /root/.vnc
  37. COPY xstartup /root/.vnc/
  38. RUN chmod a+x /root/.vnc/xstartup
  39. RUN touch /root/.vnc/passwd && \
  40. /bin/bash -c "echo -e 'password\npassword\nn' | vncpasswd" > /root/.vnc/passwd && \
  41. chmod 400 /root/.vnc/passwd && \
  42. chmod go-rwx /root/.vnc && \
  43. touch /root/.Xauthority
  44. COPY start-vncserver.sh /root/
  45. COPY baangt.sh /root/
  46. RUN chmod a+x /root/start-vncserver.sh && \
  47. chmod a+x /root/baangt.sh && \
  48. echo "mycontainer" > /etc/hostname && \
  49. echo "127.0.0.1 localhost" > /etc/hosts && \
  50. echo "127.0.0.1 mycontainer" >> /etc/hosts
  51. # Copy the google-chrome setting (with --no-sandbox and -disable-gpu)
  52. COPY google-chrome /opt/google/chrome/
  53. RUN chmod a+x /opt/google/chrome/google-chrome
  54. WORKDIR /baangt
  55. RUN mkdir /baangt/browserDrivers
  56. RUN python3 baangt.py --reloadDrivers=True
  57. EXPOSE 5901
  58. ENV USER root
  59. CMD [ "/root/start-vncserver.sh" ]