Public | Automated Build

Last pushed: never
# CONTAINER_ID=(sudo docker run -d preznik/docker-desktop) # sudo docker logs $CONTAINER_ID |grep Password # sudo docker inspect $CONTAINER_ID |grep IPAddress # ssh -XC docker@hostIP # firefox # This file creates a container that runs X11 and SSH services # The ssh is used to forward X11 and provide you encrypted data # communication between the docker container and your local # machine. # # Xpra allows to display the programs running inside of the # container such as Firefox, LibreOffice, xterm, etc. # with disconnection and reconnection capabilities # # Xephyr allows to display the programs running inside of the # container such as Firefox, LibreOffice, xterm, etc. # # Fluxbox and ROX-Filer creates a very minimalist way to # manages the windows and files. # # Author: Roberto Gandolfo Hashioka # Date: 07/28/2013 FROM ubuntu:12.10 MAINTAINER Pini Reznik "" RUN apt-get update # Set the env variable DEBIAN_FRONTEND to noninteractive ENV DEBIAN_FRONTEND noninteractive # Installing the environment required: xserver, xdm, flux box, roc-filer and ssh RUN apt-get install -y xpra rox-filer ssh pwgen xserver-xephyr xdm fluxbox # Configuring xdm to allow connections from any IP address and ssh to allow X11 Forwarding. RUN sed -i 's/DisplayManager.requestPort/!DisplayManager.requestPort/g' /etc/X11/xdm/xdm-config RUN sed -i '/#any host/c\*' /etc/X11/xdm/Xaccess RUN ln -s /usr/bin/Xorg /usr/bin/X RUN echo X11Forwarding yes >> /etc/ssh/ssh_config # Upstart and DBus have issues inside docker. We work around in order to install firefox. RUN dpkg-divert --local --rename --add /sbin/initctl && ln -s /bin/true /sbin/initctl # Installing fuse package (libreoffice-java dependency) and it's going to try to create # a fuse device without success, due the container permissions. || : help us to ignore it. # Then we are going to delete the postinst fuse file and try to install it again! # Thanks Jerome for helping me with this workaround solution! :) # Now we are able to install the libreoffice-java package RUN apt-get -y install fuse || : RUN rm -rf /var/lib/dpkg/info/fuse.postinst RUN apt-get -y install fuse # Installing the apps: Firefox, flash player plugin, LibreOffice and xterm # libreoffice-base installs libreoffice-java mentioned before RUN apt-get install -y firefox xterm ubuntu-restricted-extras # Add Android stuff RUN apt-get install -y libc6-i386 lib32z1 lib32ncurses5 lib32stdc++6 RUN apt-get install -y openjdk-7-jre-headless ADD /src/ #RUN unzip -q /home/docker/ -d /home/docker/ # Set locale (fix the locale warnings) RUN localedef -v -c -i en_US -f UTF-8 en_US.UTF-8 || : # Copy the files into the container ADD . /src EXPOSE 22 # Start xdm and ssh services. CMD ["/bin/bash", "/src/"]
Source Repository