A basic working desktop that is browser/cloud accessible
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
commit
483f3e4758
5 changed files with 59 additions and 0 deletions
20
Dockerfile
Normal file
20
Dockerfile
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
FROM fedora:latest
|
||||||
|
RUN dnf update -y --refresh && \
|
||||||
|
dnf install -y @xfce-desktop firefox thunderbird && \
|
||||||
|
dnf install -y tigervnc-server novnc net-tools git python-numpy && \
|
||||||
|
dnf clean all && \
|
||||||
|
git clone https://github.com/kanaka/websockify /usr/bin/websockify && \
|
||||||
|
adduser -m -u 1000 limited
|
||||||
|
RUN echo -n limited | passwd --stdin limited
|
||||||
|
COPY default-vncpasswd /
|
||||||
|
COPY default-vncxstartup /
|
||||||
|
COPY default-vncconfig /
|
||||||
|
ENV PREFERRED="startxfce4"
|
||||||
|
ENV HOME=/home/limited
|
||||||
|
RUN chown -R limited /home/limited
|
||||||
|
USER limited
|
||||||
|
WORKDIR /home/limited
|
||||||
|
VOLUME ["/home/limited"]
|
||||||
|
EXPOSE 5900 6080
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
ENTRYPOINT bash /entrypoint.sh
|
9
default-vncconfig
Normal file
9
default-vncconfig
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
## Supported server options to pass to vncserver upon invocation can be listed
|
||||||
|
## in this file. See the following manpages for more: vncserver(1) Xvnc(1).
|
||||||
|
## Several common ones are shown below. Uncomment and modify to your liking.
|
||||||
|
##
|
||||||
|
# securitytypes=vncauth,tlsvnc
|
||||||
|
# desktop=sandbox
|
||||||
|
# geometry=2000x1200
|
||||||
|
# localhost
|
||||||
|
# alwaysshared
|
1
default-vncpasswd
Normal file
1
default-vncpasswd
Normal file
|
@ -0,0 +1 @@
|
||||||
|
pKя:<3A><><EFBFBD>
|
10
default-vncxstartup
Normal file
10
default-vncxstartup
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
unset SESSION_MANAGER
|
||||||
|
unset DBUS_SESSION_BUS_ADDRESS
|
||||||
|
. /etc/X11/xinit/xinitrc-common
|
||||||
|
if [ -n "$PREFERRED" ] ; then
|
||||||
|
exec "$PREFERRED"
|
||||||
|
else
|
||||||
|
exec startxfce4
|
||||||
|
fi
|
19
entrypoint.sh
Normal file
19
entrypoint.sh
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
mkdir -p $HOME/.vnc
|
||||||
|
if [ ! -f "$HOME/.vnc/passwd" ] ; then
|
||||||
|
cp -av /default-vncpasswd $HOME/.vnc/passwd
|
||||||
|
chmod 0600 $HOME/.vnc/passwd
|
||||||
|
fi
|
||||||
|
if [ ! -f "$HOME/.vnc/config" ] ; then
|
||||||
|
cp -av /default-vncconfig $HOME/.vnc/config
|
||||||
|
fi
|
||||||
|
if [ ! -f "$HOME/.vnc/xstartup" ] ; then
|
||||||
|
cp -av /default-vncxstartup $HOME/.vnc/xstartup
|
||||||
|
chmod +x $HOME/.vnc/xstartup
|
||||||
|
fi
|
||||||
|
|
||||||
|
vncserver :0 -name limited-desktop
|
||||||
|
novnc_server ${1:"$@"}
|
Loading…
Reference in a new issue