在Docker容器上运行iis

时间:2019-05-07 09:18:36

标签: docker iis

我想从我的泊坞窗呼叫iis。如您所见,我有这些图像:

REPOSITORY                             TAG                 IMAGE ID            CREATED             SIZE
microsoft/iis                          latest              bb59d00aa26a        3 weeks ago         4.61GB
mcr.microsoft.com/windows/servercore   ltsc2019            954d1507112f        3 weeks ago         4.43GB

所以我称它为运行Windows Core:

docker run -i -t 954d1507112f

它可以正常工作,并且我打开了cmd,我想在我的容器上安装IIS,所以我运行它:

Add-WindowsFeature web-server, web-webserver

但是我得到这个错误:

'Add-WindowsFeature' is not recognized as an internal or external command,
operable program or batch file.

1 个答案:

答案 0 :(得分:0)

您应在docker容器中运行powershell命令,并在Add-WindowsFeature web-server, web-webserver中使用ps