mviereck / x11docker

Run GUI applications and desktops in docker and podman containers. Focus on security.
MIT License
5.62k stars 378 forks source link

docker-for-win: Xvfb in image provided to xpra on host #125

Closed mviereck closed 5 years ago

mviereck commented 5 years ago

Coming from #121

Setup example to run Xvfb in docker image used by xpra on host.

Dockerfile:

FROM debian:stretch-slim
RUN apt-get update
RUN apt-get install -y xvfb
CMD Xvfb :20 -listen tcp -screen 0 4720x3840x24 -ac

Script:

# x11docker running Xvfb. 
# read and --showpid1 serve to continue script after container is up and running
read dummy < <(x11docker --tty --name xvfb --showpid1 -- x11docker/xvfb)
# Get IP of container:
Containerip=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' xvfb)
# Run xpra server
xpra start $Containerip:20 --use-display

xpra client fails here with: unknown format for display name: 172.17.0.3:20. I am not sure if this is due to my recent switch to the python3 version. If I provide DISPLAY without IP I get cannot find live server for display :20

mviereck commented 5 years ago

Feel free to re-open if this is of interest again.