chenyihui 3 năm trước cách đây
mục cha
commit
c88b435fbb
9 tập tin đã thay đổi với 31 bổ sung41 xóa
  1. 16 14
      Dockerfile
  2. 0 3
      conf.d/fluxbox.conf
  3. 3 0
      conf.d/vnc4server.conf
  4. 0 3
      conf.d/x11vnc.conf
  5. 0 3
      conf.d/xterm.conf
  6. 0 3
      conf.d/xvfb.conf
  7. 0 15
      entrypoint.sh
  8. 1 0
      passwd
  9. 11 0
      xstartup

+ 16 - 14
Dockerfile

@@ -1,19 +1,11 @@
-FROM debian:buster
+FROM ubuntu:bionic
 
 # Install git, supervisor, VNC, & X11 packages
 RUN set -ex; \
+    export DEBIAN_FRONTEND=noninteractive; \
     apt-get update; \
     apt-get install -y \
-      bash \
-      fluxbox \
-      git \
-      net-tools \
-      novnc \
-      supervisor \
-      x11vnc \
-      xterm \
-      xvfb
-
+      xfce4 vnc4server xfce4-terminal supervisor novnc
 # Setup demo environment variables
 ENV HOME=/root \
     DEBIAN_FRONTEND=noninteractive \
@@ -22,9 +14,19 @@ ENV HOME=/root \
     LC_ALL=C.UTF-8 \
     DISPLAY=:0.0 \
     DISPLAY_WIDTH=1024 \
-    DISPLAY_HEIGHT=768 \
-    RUN_XTERM=yes \
-    RUN_FLUXBOX=yes
+    DISPLAY_HEIGHT=768
+
+RUN apt-get install -y \
+    language-pack-zh-hans \
+    fonts-droid-fallback \
+    ttf-wqy-zenhei \
+    ttf-wqy-microhei \
+    fonts-arphic-ukai \
+    fonts-arphic-uming
+
 COPY . /app
+COPY xstartup /root/.vnc/xstartup
+COPY passwd /root/.vnc/passwd
 CMD ["/app/entrypoint.sh"]
 EXPOSE 8080
+EXPOSE 5900

+ 0 - 3
conf.d/fluxbox.conf

@@ -1,3 +0,0 @@
-[program:fluxbox]
-command=fluxbox
-autorestart=true

+ 3 - 0
conf.d/vnc4server.conf

@@ -0,0 +1,3 @@
+[program:vnc4server]
+command=vnc4server :0
+autorestart=true

+ 0 - 3
conf.d/x11vnc.conf

@@ -1,3 +0,0 @@
-[program:x11vnc]
-command=x11vnc -forever -shared
-autorestart=true

+ 0 - 3
conf.d/xterm.conf

@@ -1,3 +0,0 @@
-[program:xterm]
-command=xterm
-autorestart=true

+ 0 - 3
conf.d/xvfb.conf

@@ -1,3 +0,0 @@
-[program:xvfb]
-command=Xvfb :0 -screen 0 "%(ENV_DISPLAY_WIDTH)s"x"%(ENV_DISPLAY_HEIGHT)s"x24 -listen tcp -ac
-autorestart=true

+ 0 - 15
entrypoint.sh

@@ -1,19 +1,4 @@
 #!/bin/bash
 set -ex
 
-RUN_FLUXBOX=${RUN_FLUXBOX:-yes}
-RUN_XTERM=${RUN_XTERM:-yes}
-
-case $RUN_FLUXBOX in
-  false|no|n|0)
-    rm -f /app/conf.d/fluxbox.conf
-    ;;
-esac
-
-case $RUN_XTERM in
-  false|no|n|0)
-    rm -f /app/conf.d/xterm.conf
-    ;;
-esac
-
 exec supervisord -c /app/supervisord.conf

+ 1 - 0
passwd

@@ -0,0 +1 @@
+�шљ+�и§�

+ 11 - 0
xstartup

@@ -0,0 +1,11 @@
+#!/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
+vncconfig -iconic &
+startxfce4 &