A Docker image for remote connections to our teaching image
3.4K
Inspired by https://stackoverflow.com/questions/46508679/dockerize-user-sessions
Tested on Ubuntu 18.04
sudo adduser $USER dockercurl https://raw.githubusercontent.com/LCAS/docker-vncserver-teaching/main/dockershell?token=AAIZQPE7SHSSPFDNUD6ERN3ABAUNS | sudo tee /usr/local/bin/dockershell
sudo chmod +x /usr/local/bin/dockershell
sudo useradd --create-home --shell /usr/local/bin/dockershell remote
echo "remote:PASSWORD" | sudo chpasswd
sudo usermod -aG docker remote
# restart docker
sudo snap disable docker
sudo snap enable docker
change PASSWORD to a suitable password, and replace remote with another user name as needed.
sudo mkdir /srv/remote_usersudo chown 1000:1000 /srv/remote_userSimply invoke dockershell for any user who can execute the docker command. The home directory will be available inside the container and you will be the same user as on the host system.
Simple as docker-user-session.sh USERNAME, where USERNAME is a user id known on the host machine. Home directories etc are mounted, and VNC session is by default started at port 6xxxx, where xxxx is the UID of the chosen user.
You can automate ngrok start up for this port, by adding an ngrok password, e.g. docker-user-session.sh -n SECRET USERNAME.
sudo install -d -o 2000:2000 /srv/lcas_docker_user (you may substitute )docker run --rm -it -p 61111:6080 -v /srv/lcas_docker_user:/home/lcas lcasuol/vnc-server:latestDirect your browser to http://IP:61111 (or another port you have configured).
These steps show how to install the RASberry system if needed
mkdir -p ~/rasberry_ws/src && cd ~/rasberry_ws && catkin build && cd ~/rasberry_ws/srcgit clone --recurse-submodules --shallow-submodules --depth 1 https://github.com/LCAS/RASberry.gitrosdep update && apt-get update && rosdep install --from-paths ~/rasberry_ws/src -i -ycatkin build && pip install -U tmuleyou can expose the port via ngrok, e.g., like
ngrok1 -subdomain coltrane-marchanheide -proto=https -httpauth marchanheide:PASSWORD -log=stdout -log-level WARNING 61002
Content type
Image
Digest
Size
1.3 GB
Last updated
about 5 years ago
docker pull lcasuol/vnc-server