我试图通过使用XDummy驱动程序在docker容器内运行X11服务器.但是,我在使用它时遇到了问题.预期目的是执行无头渲染.我可以使用Xvfb来使用它,但我需要RANDR支持,并且最终还需要GL支持.
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" ]
Run Code Online (Sandbox Code Playgroud)
xorg.conf文件是基本的Xdummy xorg.conf
但是,xserver没有启动,并且日志文件没有提供任何有用的东西,但我确信在Dockerfile中设置Xorg时我做错了什么,但我找不到任何类似的例子.
建议的程序是什么?

我目前正在尝试将肖恩·奥尼尔的着色器转换为版本330,因此我可以在我正在编写的应用程序中试用它.我对已弃用的函数有一些问题,所以我替换了它们,但我几乎全新的glsl,所以我可能在某个地方犯了一个错误.
原始着色器可以在这里找到:http: //www.gamedev.net/topic/592043-solved-trying-to-use-atmospheric-scattering-oneill-2004-but-get-black-sphere/
我试图改变它们的可怕尝试:
顶点着色器:
#version 330 core
// Input vertex data, different for all executions of this shader.
layout(location = 0) in vec3 vertexPosition_modelspace;
layout(location = 2) in vec3 vertexNormal_modelspace;
uniform vec3 v3CameraPos; // The camera's current position
uniform vec3 v3LightPos; // The direction vector to the light source
uniform vec3 v3InvWavelength; // 1 / pow(wavelength, 4) for the red, green, and blue channels
uniform float fCameraHeight; // The camera's current height
uniform float fCameraHeight2; // fCameraHeight^2 …Run Code Online (Sandbox Code Playgroud)