如何在Docker映像中打开Ubuntu GUI [英] How to open Ubuntu GUI inside a Docker image

查看:490
本文介绍了如何在Docker映像中打开Ubuntu GUI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Windows的Docker中下载了Ubuntu映像。



我可以通过以下方式运行Ubuntu:

  docker run -it ubuntu 

我只看到 root ,但看不到Ubuntu GUI。如何为该映像安装或配置GUI并像在VM中运行一样在该GUI上运行应用程序?

解决方案

通常,使用Docker进行开发的方法是将IDE保留在工作站上,并使用从源代码生成的二进制文件构建映像。



您可以找到许多这样的示例



(但这是针对Visual Studio 2015,而不是Visual Studio Code。)


I have downloaded the Ubuntu image inside Docker on Windows.

I can run Ubuntu by:

docker run -it ubuntu

I only see root, but I don't see the Ubuntu GUI. How do I install or configure the GUI for that image and run applications on that GUI like we run in a VM?

解决方案

Generally, the approach for developing with Docker is to keep the IDE on the workstation, and build images with the binary produced from the sources.

You can find many example of such a workflow (local compilation, deployment in Docker containers) in domeide.github.io/ (Docker meets the IDE!)
For example: Docker Tools for VisualStudio allows for a tight integration between your editor and Docker processes.

(But this is for Visual Studio 2015, not Visual Studio Code.)

这篇关于如何在Docker映像中打开Ubuntu GUI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆