Skip to content

Instantly share code, notes, and snippets.

@rena2019
Created October 17, 2022 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rena2019/1548187aa9ce751a812c20386bdda6a5 to your computer and use it in GitHub Desktop.
Save rena2019/1548187aa9ce751a812c20386bdda6a5 to your computer and use it in GitHub Desktop.
--- myssh ---------------------------------------------
#Probleme:
#1. ohne das "-v /sys/fs/cgroup" (geht das auch unter Windows?) gibt es
# Problemen im Container mit service: /lib/rc/sh/openrc-run.sh: line 108: can't create /sys/fs/cgroup
#2. durch das erforderliche setzen des "passwd root" (mit Passwort Eingabe) ist das Dockerfile nicht none-interactive
# docker run -p 8080:8080 -p 8022:22 -v /sys/fs/cgroup -it --name myssh alpine /bin/sh
#für novnc: docker run -p 7900:7900 -p 4900:4900 -p 8080:8080 -p 8022:22 -v /sys/fs/cgroup -it --name myssh alpine /bin/sh
apk add openssh openrc
rc-update add sshd
echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
#password setzen
passwd root
rc-status
touch /run/openrc/softlevel
/etc/init.d/sshd start
----
irgendwie nach https://crashlaker.github.io/2022/04/09/xfvb_+_vnc_+_novnc_+_fluxbox.html
# start myssh Docker container
#testing ist fuer no novnc_server erforderlich
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
apk add xvfb x11vnc novnc fluxbox xterm
#*) alle erforderlichen programme starten
Xvfb :1 -screen 0, 1024x720x24 &
x11vnc -display :1 -noxdamage -rfbport 4900 &
novnc_server --listen 7900 --vnc localhost:4900 &
DISPLAY=:1 fluxbox &
#GUI app starten: xterm und dann weiter GUI im Terminal fenster
DISPLAY=:1 xterm &
#bzw
apk add firefox
DISPLAY=:1 firefox
#funktioniert nur 1 mal?
http://192.168.178.148:7900/vnc.html?host=192.168.178.148&port=7900
#hardcore restart:
killall fluxbox novnc_server x11vnc Xvfb
# und bei *) beginnen
----------------------------------------
# alpine:3.12 mit xrdp xvfb xfce4 ...
docker run -d --name rdp -p 3389:3389 --name myrdp danielguerra/alpine-xrdp-dind
# auf PC RDP Desktop anschauen mit
mstsc /v:192.168.178.148
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment