moved to ubuntu18

This commit is contained in:
Ville Rantanen
2019-02-14 11:51:00 +02:00
parent 024295c98a
commit 514e6bd042
4 changed files with 8 additions and 45 deletions

View File

@@ -1,16 +1,16 @@
FROM ubuntu:16.04
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --allow-unauthenticated vim openssh-server mc \
less mercurial wget boxes firefox chromium-browser sudo netcat \
lxde vnc4server net-tools terminator lxappearance figlet && apt-get clean
less mercurial fiurefox chromium-browser git wget curl boxes sudo netcat \
net-tools terminator default-jdk figlet python3-dev && apt-get clean && \
curl https://bootstrap.pypa.io/get-pip.py | python3
RUN hg clone https://bitbucket.org/MoonQ/tools /usr/local/share/q-tools
RUN echo X11UseLocalhost no >> /etc/ssh/sshd_config
ADD bootstuff.sh /
ADD userinit.sh /
ADD vnc_passwd /
RUN /userinit.sh

View File

@@ -1,17 +1,14 @@
# Sandbox X environment in Docker
This setup creates a VNC server running LXDE with two browsers installed
This setup creates a ssh server with two browsers installed
(chromium and firefox).
The executable connects to the container with SSH. Once SSH session exits,
the container is destroyed. The executable automatically starts `vncviewer`
after starting the container if --vnc passed.
the container is destroyed.
Run the `build-run` script to build and run the container.
Following arguments may be passed:
* `--vnc` Starts vncviewer
* `--geometry` Default geometry for VNC server, e.g. `1024x768`
* `--new-passwd` Generates a new random `vnc_passwd` file used
for authenticating the VNC client.
for authentication.

View File

@@ -35,7 +35,6 @@ for (( i=1; i<=$#; i++ )); do
}
done
set -e
[[ -f vnc_passwd ]] || pwgen
[[ -f .id_rsa.pub ]] || rsagen
[[ -f .id_rsa ]] || rsagen
@@ -76,14 +75,6 @@ while :; do
ssh-keyscan $IP && break
done
[[ "$VNC" -eq 1 ]] && {
ssh -i .id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $USER@$IP /home/$USER/bin/vncs "$VNCSIZE"
while :; do
wget -qO- ${IP}:5900 && break
sleep 5
done
vncviewer -passwd vnc_passwd ${IP}:5900 &> /dev/null &
}
ssh -i .id_rsa -XY -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $USER@$IP #&& break
echo "Shutting down $nname"
sleep 1

View File

@@ -12,31 +12,6 @@ echo '--PUBKEY--' > /home/$USR/.ssh/authorized_keys
chmod 700 /home/$USR/.ssh
chmod 600 /home/$USR/.ssh/authorized_keys
chsh -s /bin/bash $USR
cp /vnc_passwd /home/$USR/.vnc/passwd
chmod 600 /home/$USR/.vnc/passwd
echo '#!/bin/sh
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
terminator &
openbox &
lxpanel -p LXDE &
pcmanfm --desktop --profile LXDE &
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 *
' > /home/$USR/.vnc/xstartup
echo "#!/bin/bash
vncserver :0 -depth 24 \$1 \
-geometry 1680x1050 \
-geometry 800x600 \
-geometry 1024x768 \
-geometry 1280x1024 \
-geometry 1600x1200 \
-geometry 1280x720
" > /home/$USR/bin/vncs
echo "#!/bin/bash