Add 'gui' docker files, which include running X11 via a VNC server

This commit is contained in:
Robin Dunn
2019-07-02 18:20:51 -07:00
parent de95ecbc87
commit c21cb5f6d2
3 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
FROM wxpython/build:fedora-30
RUN sudo dnf -y install tigervnc-server xterm
RUN mkdir ~/.vnc
# RUN sudo dnf -y install fluxbox
# RUN echo "fluxbox &"> ~/.vnc/xstartup
# RUN sudo dnf -y install @xfce-desktop-environment
# RUN echo "startxfce4 &"> ~/.vnc/xstartup
# RUN sudo dnf -y install --allowerasing @mate-desktop-environment
# RUN echo "mate-session &"> ~/.vnc/xstartup
RUN sudo dnf -y install @lxde-desktop-environment
RUN echo "startlxde &"> ~/.vnc/xstartup
RUN chmod u+x ~/.vnc/xstartup
RUN echo "password" | vncpasswd -f >> ~/.vnc/passwd
RUN chmod 600 ~/.vnc/passwd
CMD ["start-vncserver.sh"]

View File

@@ -0,0 +1,26 @@
FROM wxpython/build:ubuntu-18.04
USER root:root
RUN apt-get install -y \
libx11-6 libxcb1 libxau6 xterm \
tightvncserver \
xvfb dbus-x11 x11-utils \
xfonts-base xfonts-75dpi xfonts-100dpi \
# Choose one of these:
# lxde
lubuntu-desktop
# ubuntu-mate-desktop
USER ${USER}:${USER}
RUN touch ~/.Xauthority; \
mkdir ~/.vnc; \
echo "password" | vncpasswd -f >> ~/.vnc/passwd; \
chmod 600 ~/.vnc/passwd; \
# And a coresponding one of these:
# echo "exec /usr/bin/startlxde" > ~/.vnc/xstartup;
echo "exec lxsession -e LXDE -s Lubuntu" > ~/.vnc/xstartup;
# echo "exec mate-session" > ~/.vnc/xstartup;
RUN chmod +x ~/.vnc/xstartup;
CMD ["start-vncserver.sh"]

View File

@@ -0,0 +1,3 @@
#!/bin/bash
echo "starting VNC server ..."
vncserver :1 -geometry 1600x1050 -depth 24 && tail -F ~/.vnc/*.log