I am trying to run a X11 server inside a docker container by using the XDummy driver. However, I have problems getting it to work. The intended purpose is to perform headless rendering. I can get it to work using Xvfb, but I need RANDR support, and eventually going to need GL support as well.
Dockerfile:
FROM node:slim
RUN mkdir nodeapp \
&& apt-get update \
&& apt-get install -y xorg \
&& apt-get install -y xserver-xorg-video-dummy x11-apps
COPY App /nodeapp/
ENV DISPLAY :1
RUN cd nodeapp/ \
&& npm install \
&& Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile /nodeapp/xdummy.log -config /nodeapp/xorg.conf start :1 &
ENTRYPOINT [ "node", "/nodeapp/index.js" ]
The xorg.conf file is the basic Xdummy xorg.conf
However, the xserver does not boot, and the logfile does not provide anything useful, but I am certain I am doing something wrong when setting up Xorg in the Dockerfile, but I can't find any examples doing anything similar.
What is the recommended procedure to make this work?
docker volume create --name x11tmp
and add-v x11tmp:/tmp/.X11-unix
to both run commands for creating the containers. – Stomatic