diff --git a/CHANGELOG.md b/CHANGELOG.md index ad280ba..cb10712 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.4.0 (2014-08-19) + + OS: Upgraded from 12.10 to 14.04 + + Fixed Issue: Added a packet (Xvfb) to make the program work under ubuntu 14.04 (by @clu2) + + Fixed Issue: Fix login PAM issue with ssh + ## 0.3.0 (2013-07-18) + Funcionality: Allow users to configure the screen resolution + Funcionality: Allow users to create multi-sessions diff --git a/Dockerfile b/Dockerfile index 0a05a33..622c3a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,25 +17,28 @@ # Date: 07/28/2013 -FROM ubuntu:12.10 +FROM ubuntu:16.04 MAINTAINER Roberto G. Hashioka "roberto_hashioka@hotmail.com" -RUN apt-get update +RUN apt-get update -y +RUN apt-get upgrade -y # 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 +RUN apt-get install -y xpra rox-filer openssh-server pwgen xserver-xephyr xdm fluxbox xvfb locales sudo # 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 +# Fix PAM login issue with sshd +RUN sed -i 's/session required pam_loginuid.so/#session required pam_loginuid.so/g' /etc/pam.d/sshd + # 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 +RUN dpkg-divert --local --rename --add /sbin/initctl && ln -sf /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. @@ -48,7 +51,7 @@ 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 libreoffice-base firefox libreoffice-gtk libreoffice-calc xterm ubuntu-restricted-extras +RUN apt-get install -y libreoffice-base firefox libreoffice-gtk libreoffice-calc xterm # Set locale (fix the locale warnings) RUN localedef -v -c -i en_US -f UTF-8 en_US.UTF-8 || : diff --git a/MAINTAINER b/MAINTAINER new file mode 100644 index 0000000..d2a6474 --- /dev/null +++ b/MAINTAINER @@ -0,0 +1,2 @@ +Roberto Hashioka (@rogaha) +Paim Pozhil (@paimpozhil) diff --git a/README.md b/README.md index b735ea4..f9885e6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ DOCKER-DESKTOP ============== -##Description +## Description This Dockerfile creates a docker image and once it's executed it 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. @@ -10,20 +10,20 @@ Xpra + Xephyr allows to display the applications running inside of the container The applications can be rootless, so the client machine manages the windows that are displayed. -Fluxbox and ROX-Filer creates a very minimalist way to manages the windows and files. +Fluxbox and ROX-Filer creates a very minimalist way to manage windows and files. ![Docker L](image/docker-desktop.png "Docker-Desktop") OBS: The client machine needs to have a X11 server installed (Xpra). See the "Notes" below. -##Docker Installation +## Docker Installation -###On Ubuntu: +### On Ubuntu: Docker is available as a Ubuntu PPA (Personal Package Archive), hosted on launchpad which makes installing Docker on Ubuntu very easy. ``` -#Add the PPA sources to your apt sources list. +# Add the PPA sources to your apt sources list. sudo apt-get install python-software-properties && sudo add-apt-repository ppa:dotcloud/lxc-docker # Update your sources @@ -32,21 +32,21 @@ sudo apt-get update # Install, you will see another warning that the package cannot be authenticated. Confirm install. sudo apt-get install lxc-docker ``` -###On Windows: +### On Windows: Requirements: - Installation Tutorial (http://docs.docker.io/en/latest/installation/windows/) -###On Mac OS X: +### On Mac OS X: Requirements: - Installation Tutorial (http://docs.docker.io/en/latest/installation/vagrant/) -##Installation +## Installation -###Building the docker image +### Building the docker image ``` -$ docker build -t [username]/docker-desktop git://github.com/rogaha/docker-desktop.git +$ docker build -t rogaha/docker-desktop git://github.com/rogaha/docker-desktop.git OR @@ -55,13 +55,13 @@ $ cd docker-desktop $ docker build -t [username]/docker-desktop . ``` -###Running the docker image created (-d: detached mode, -P: expose the port 22 on the host machine) +### Running the docker image created (-d: detached mode, -P: expose the port 22 on the host machine) ``` $ CONTAINER_ID=$(docker run -d -P [username]/docker-desktop) ``` -###Getting the password generated during runtime +### Getting the password generated during runtime ``` $ echo $(docker logs $CONTAINER_ID | sed -n 1p) @@ -69,24 +69,24 @@ User: docker Password: xxxxxxxxxxxx # where xxxxxxxxxxxx is the password created by PWGen that contains at least one capital letter and one number ``` -##Usage +## Usage -###Getting the container's external ssh port +### Getting the container's external ssh port ``` $ docker port $CONTAINER_ID 22 49153 # This is the external port that forwards to the ssh service running inside of the container as port 22 ``` -###Connecting to the container +### Connecting to the container -####Starting the a new session +#### Starting the a new session ``` $ ifconfig | grep "inet addr:" inet addr:192.168.56.102 Bcast:192.168.56.255 Mask:255.255.255.0 # This is the LAN's IP for this machine -$ ssh docker@192.168.56.102 -p 49153 ./docker-desktop -s 800x600 -d 10 # Here is where we use the external port +$ ssh docker@192.168.56.102 -p 49153 "sh -c './docker-desktop -s 800x600 -d 10 > /dev/null 2>&1 &'" # Here is where we use the external port docker@192.168.56.102's password: xxxxxxxxxxxx $ ./docker-desktop -h @@ -99,7 +99,7 @@ Usage: docker-desktop [-s screen_size] [-d session_number] ----------------------------------------------------------- ``` -####Attaching to the session started +#### Attaching to the session started ``` $ xpra --ssh="ssh -p 49153" attach ssh:docker@192.168.56.102:10 # user@ip_address:session_number @@ -111,20 +111,20 @@ DISPLAY=:[session_number] [program_name] & Eg. DISPLAY=:10 firefox & -##Notes +## Notes -###On Windows: +### On Windows: Requirements: -- Xpra <= 0.9.8 (https://www.xpra.org/dists/windows/) +- Xpra <= 14.0 (https://www.xpra.org/dists/windows/) - Path: C:\Program Files(x86)\Xpra\Xpra_cmd.exe -###On OS X: +### On OS X: Requirements: -- Xpra Version <= 0.9.8 (https://www.xpra.org/dists/osx/x86/) +- Xpra Version <= 14.0 (https://www.xpra.org/dists/osx/x86/) - Path: /Applications/Xpra.app/Contents/Helpers/xpra -###On Linux: +### On Linux: Requirements: - Xpra: You can use apt-get to install it -> apt-get install xpra - Path: /usr/bin/xpra