docker - 无法从 Windows 容器显示 GUI 应用程序

标签 docker

我有一个带有 GUI 应用程序的图像,带有 microsoft/windowsservercore 的基本图像。图像中的应用程序已正确安装,但我无法在主机上显示它。在谷歌上阅读了几篇关于此的文章,他们建议安装 XServer for Windows,然后我们可以在主机上显示应用程序。我一直在尝试运行以下命令(如大多数文章中所建议的那样),但是它什么也没做,而且我没有得到显示。请协助。

docker run --rm -it -e DISPLAY=127.0.0.1:0.0 eft

最佳答案

DISPLAY 对 Linux 容器很有用。

作为mentioned here :

WindwosServerCore image does not come with binaries for UI applications so I doubt this will ever work in servercore image but Microsoft insiders can use new bigger WindwosServer image which I beleive have those libraries intact.

thread adds :

I understand that you can run GUI apps but the rendered elements are not shown on any desktop. Lars Iwer [MSFT] writes in the discussion below the article:

In the container image as it is right now, GUI elements will be rendered in session 0. UI automation should work with that (e.g. programmatically searching for a window etc.).

session 0 是运行所有系统服务的 session ,根据定义是非交互式的。 session 、工作站和桌面是 Windows (NT) 中的隔离手段,应用程序能否显示 UI 并接收用户交互取决于它是否有权访问带有桌面的工作站。
Session 0 中的进程默认没有。
但是以前可以“允许服务与桌面交互”,也可以在 session 0 以外的其他 session 中运行交互式服务(注意“现在是这样”)。因此,很高兴听到 Microsoft/Docker 团队对此的一些专家见解......

关于docker - 无法从 Windows 容器显示 GUI 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56179570/

相关文章:

开发中的 Docker 与 Rocket

javascript - 容器与宿主机共享 `node_modules`文件夹

angular - 在同一 Docker 服务器上托管 Ionic 3 和 express JS Rest API

docker - NEO4J:无法在以下位置加载外部资源:文件:/var/lib/neo4j/import/

docker - 有关Docker基础的一些问题吗?

docker - 为 2 个不同的 DLT 网络重新使用 Hyperledger Fabric 中的对等点/节点

java - 在docker容器中部署.war文件: No main manifest attribute in app. war

docker - 在docker中,以非root身份将文件写入挂载的文件系统?

mongodb - 如何在kubernetes中包含带有mongo图像的数据

docker - W:无法获取http://httpredir.debian.org/debian/dists/jessie-updates/InRelease找不到