I have created a docker image that has LXDE and TightVNCServer.
# Pull base image.
FROM ubuntu
# Install LXDE and VNC server.
RUN apt-get update
RUN apt-get install -y xvfb
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y lxde-core lxterminal tightvncserver
RUN rm -rf /var/lib/apt/lists/*
RUN touch /root/.Xresources
RUN touch /root/.Xauthority
COPY xstartup /root/.vnc/xstartup
RUN chmod +x /root/.vnc/xstartup
#Install Node.js & npm
# Define working directory.
WORKDIR /data
COPY * /data
RUN apt-get install -y ffmpeg
I am running this container using this command:
docker run -it --rm -v /data:/data -p 5901:5901 -e USER=root ubuntudsktp bash -c "vncserver :1 -geometry 1280x800 -depth 24 && tail -F /root/.vnc/*.log"
I am logging into this container using VNC and running this command to record the whole screen:
ffmpeg -f x11grab -i :1.0 output.webm
After the recording was over, I opened the video and I could see that the video is completely blank(black screen).
this is also my input when i try to run glxinfo
:
# glxinfo | grep "OpenGL renderer"
Error: unable to open display
I have also tried to run it using:
DISPLAY=:1 ffmpeg -f x11grab -i :1.0 output.webm
And the results are the same.
What I am missing here?