如何在Docker上运行.exe文件? [英] How do you run an .exe file on Docker?

查看:579
本文介绍了如何在Docker上运行.exe文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试了解和学习Docker.我有一个应用程序.exe文件,我想通过创建Docker在Linux或OSX上运行它.我已经在网上搜索过,但找不到任何可以做到这一点的东西,而且我对Docker的了解也不足够,无法尝试即兴创作.这可能吗?我必须使用Boot2Docker吗?您能指出我正确的方向吗?在此先感谢您的帮助.

I am currently trying to understand and learn Docker. I have an app, .exe file, and I would like to run it on either Linux or OSX by creating a Docker. I've searched online but I can't find anything allowing one to do that, and I don't know Docker well enough to try and improvise something. Is this possible? Would I have to use Boot2Docker? Could you please point me in the right direction? Thank you in advance any help is appreciated.

推荐答案

Docker允许您隔离主机上运行的应用程序,它不提供其他操作系统来运行这些应用程序(客户端产品除外)因为Docker最初是仅Linux工具,所以包含Linux VM).如果应用程序在Linux上运行,则通常可以在容器内运行.如果该应用程序无法在Linux上运行,那么它将不会在Linux容器内运行.

Docker allows you to isolate applications running on a host, it does not provide a different OS to run those applications on (with the exception of a the client products that include a Linux VM since Docker was originally a Linux only tool). If the application runs on Linux, it can typically run inside a container. If the application cannot run on Linux, then it will not run inside a Linux container.

exe是Windows二进制格式.此二进制格式与Linux不兼容(除非您在模拟器或VM中运行它).我不知道有什么简单的方法可以实现您的目标.如果要运行此二进制文件,请在Linux上跳过Docker并在主机上安装Windows VM.

An exe is a windows binary format. This binary format incompatible with Linux (unless you run it inside of an emulator or VM). I'm not aware of any easy way to accomplish your goal. If you want to run this binary, then skip Docker on Linux and install a Windows VM on your host.

这篇关于如何在Docker上运行.exe文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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