切换现有容器的隔离模式 [英] Switching isolation mode for existing container

查看:65
本文介绍了切换现有容器的隔离模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好

我可以创建Windows Server容器或Hyper-V容器。

I can create either a Windows Server container or a Hyper-V container just fine.

这将创建和启动Windows Server容器: docker run -d --name iis -svr1 mhb / iisaspdemo ping -t localhost

This will create and start a Windows Server container: docker run -d --name iis-svr1 mhb/iisaspdemo ping -t localhost

这将创建并启动Hyper-V容器: docker run -d --isolation = hyperv --name iis-hv-01 mhb / iisaspdemo ping -t localhost

This will create and start a Hyper-V container: docker run -d --isolation=hyperv --name iis-hv-01 mhb/iisaspdemo ping -t localhost

如果我然后使用命令: docker inspect< containername> 并在输出中查找隔离标记,它将显示Process(对于Windows Server容器)或HyperV对于Hyper-V容器。

If i then use the command: docker inspect <containername> and look for isolation tag in the output, it will say either Process (for Windows Server container) or HyperV for a Hyper-V container.

有没有办法将现有的Windows Server容器转换为使用docker的Hyper-V容器以及我将使用的命令。

Is there any way of convert a existing Windows Server container to a Hyper-V container using docker and what command would I use.

/ Michael Bcuhardt

/Michael Bcuhardt

推荐答案




一旦容器运行,我认为不可能转换。

Once a container is running I don't think it's possible to to convert.

有什么理由哟你不能只是杀死容器并在隔离的运行时中启动一个新容器吗?

Is there any reason you can't just kill the container and spin up a new one in the isolated runtime?

你想要完成什么?


这篇关于切换现有容器的隔离模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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