This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| projects:zibaldone:linux:docker [2023/03/31 19:06] – [rename volume] sscipioni | projects:zibaldone:linux:docker [2023/04/19 08:08] (current) – [docker registry (public)] sscipioni | ||
|---|---|---|---|
| Line 222: | Line 222: | ||
| docker push scipioit/ | docker push scipioit/ | ||
| </ | </ | ||
| + | |||
| + | ===== remote display via ssh ===== | ||
| + | |||
| + | scenario: connect to remote docker host via ssh and run X11 GUI on client ssh | ||
| + | |||
| + | on docker host sshd edit / | ||
| + | < | ||
| + | X11Forwarding yes | ||
| + | X11DisplayOffset 10 | ||
| + | X11UseLocalhost no | ||
| + | </ | ||
| + | |||
| + | on docker host create this helper script | ||
| + | <code bash | set-display.sh> | ||
| + | XAUTH=/ | ||
| + | HOSTIP=$(ip -o route get to 8.8.8.8 | sed -n ' | ||
| + | |||
| + | AUTH_COOKIE=$(xauth list ${DISPLAY} | awk ' | ||
| + | DISPLAY_NUMBER=$(echo $DISPLAY | cut -d. -f1 | cut -d: -f2) | ||
| + | export DISPLAY=${HOSTIP}: | ||
| + | touch $XAUTH | ||
| + | xauth -f $XAUTH add ${DISPLAY} MIT-MAGIC-COOKIE-1 ${AUTH_COOKIE} | ||
| + | </ | ||
| + | |||
| + | session from client | ||
| + | <code bash> | ||
| + | ssh -X < | ||
| + | source set-display.sh | ||
| + | docker run --rm -e DISPLAY=$DISPLAY -v $XAUTH:/ | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| ===== docker swarm ===== | ===== docker swarm ===== | ||