无法在Docker容器中为X11自动启动没有$ DISPLAY的dbus-daemon

我试图在Docker Ubuntu的容器中安装OpenJDK8,但我仍然收到这个错误:

(gconftool-2:4389): GConf-WARNING **: Client failed to connect to the D-BUS daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 

我怎样才能解决这个错误?

您可以将DISPLAYvariables设置为X服务器(例如主机上的那个),但是安装openjdk 8可以在没有X服务器的情况下完成。 你可以拿官方的java:openjdk-8图像作为例子,它的Dockerfile在这里: https : //github.com/docker-library/openjdk/blob/master/8-jdk/Dockerfile

Interesting Posts