From 803767188c228262696e02e637813898e91cb10b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B2=B3=E6=9D=BE?= Date: Sun, 16 Oct 2016 08:48:40 +0800 Subject: [PATCH] new version --- Dockerfile | 34 ++++++++++++++++++++-------------- conf/xstartup | 10 ---------- 2 files changed, 20 insertions(+), 24 deletions(-) delete mode 100755 conf/xstartup diff --git a/Dockerfile b/Dockerfile index a14b4c1..565add7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,21 @@ -FROM centos:6 -MAINTAINER xiaosong -RUN yum update -y \ -&& yum -y install wget tigervnc-server epel-release firefox \ -&& yum -y groupinstall xfce -RUN wget http://fpdownload.macromedia.com/get/flashplayer/pdc/11.2.202.635/install_flash_player_11_linux.x86_64.tar.gz \ -&& mkdir flash_player \ -&& tar zxvf install_flash_player_11_linux.x86_64.tar.gz -C flash_player \ -&& mkdir -p ~/.mozilla/plugins/ \ -&& cp flash_player/libflashplayer.so ~/.mozilla/plugins/ \ -&& rm -rf flash_player install_flash_player_11_linux.x86_64.tar.gz /tmp/.X11-unix/* -ADD ./conf/xstartup /root/.vnc/xstartup -RUN echo "xiaosong" | /usr/bin/vncpasswd -f > /root/.vnc/passwd +# Firefox over VNC +# +# VERSION 0.3 + +FROM ubuntu + +# Install vnc, xvfb in order to create a 'fake' display and firefox +RUN apt-get update \ + && apt-get install -y x11vnc xvfb firefox \ + && mkdir ~/.vnc \ + && x11vnc -storepasswd xiaosong ~/.vnc/passwd \ + && bash -c 'echo "firefox" >> /.bashrc' \ + && wget http://fpdownload.macromedia.com/get/flashplayer/pdc/11.2.202.635/install_flash_player_11_linux.x86_64.tar.gz \ + && mkdir flash_player \ + && tar zxvf install_flash_player_11_linux.x86_64.tar.gz -C flash_player \ + && mkdir -p ~/.mozilla/plugins/ \ + && cp flash_player/libflashplayer.so ~/.mozilla/plugins/ \ + && rm -rf flash_player install_flash_player_11_linux.x86_64.tar.gz + EXPOSE 5901 -CMD ["/bin/bash"] +CMD ["x11vnc", "-forever", "-usepw", "-create"] \ No newline at end of file diff --git a/conf/xstartup b/conf/xstartup deleted file mode 100755 index 16d55db..0000000 --- a/conf/xstartup +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# Uncomment the following two lines for normal desktop: -unset SESSION_MANAGER -#exec /etc/X11/xinit/xinitrc -[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup -[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources -xsetroot -solid grey -#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & -#twm & -startxfce4 & \ No newline at end of file