projects:zibaldone:linux:docker

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
projects:zibaldone:linux:docker [2023/03/31 19:06] – [rename volume] sscipioniprojects:zibaldone:linux:docker [2023/04/19 08:08] (current) – [docker registry (public)] sscipioni
Line 222: Line 222:
 docker push scipioit/trac:1.4.3 docker push scipioit/trac:1.4.3
 </code> </code>
 +
 +===== remote display via ssh =====
 +
 +scenario: connect to remote docker host via ssh and run X11 GUI on client ssh
 +
 +on docker host sshd edit /etc/ssh/sshd_config
 +<code>
 +X11Forwarding yes
 +X11DisplayOffset 10
 +X11UseLocalhost no
 +</code>
 +
 +on docker host create this helper script 
 +<code bash | set-display.sh>
 +XAUTH=/tmp/Xauthority
 +HOSTIP=$(ip -o route get to 8.8.8.8 | sed -n 's/.*src \([0-9.]\+\).*/\1/p')
 +
 +AUTH_COOKIE=$(xauth list ${DISPLAY} | awk '{print $3}')
 +DISPLAY_NUMBER=$(echo $DISPLAY | cut -d. -f1 | cut -d: -f2)
 +export DISPLAY=${HOSTIP}:${DISPLAY_NUMBER}
 +touch $XAUTH
 +xauth -f $XAUTH add ${DISPLAY} MIT-MAGIC-COOKIE-1 ${AUTH_COOKIE}
 +</code>
 +
 +session from client
 +<code bash>
 +ssh -X <hostip>
 +source set-display.sh
 +docker run --rm -e DISPLAY=$DISPLAY -v $XAUTH:/root/.Xauthority  -t beezu/xeyes
 +</code>
 +
 +
 +
 ===== docker swarm ===== ===== docker swarm =====
  
  • projects/zibaldone/linux/docker.1680282381.txt.gz
  • Last modified: 2023/03/31 19:06
  • by sscipioni