错误(消息:找不到请求的集合元素。)Docker IIS

时间:2017-07-26 16:13:55

标签: powershell iis docker iis-10

运行由下面的文件

创建的docker容器时出错
FROM microsoft/iis

RUN mkdir C:\site

RUN powershell -NoProfile -Command \
    Import-module IISAdministration; \
    New-IISSite -Name "Site" -PhysicalPath C:\site -BindingInformation "*:8080:"

Add dist\ C:\site 

ENV COMPOSE_CONVERT_WINDOWS_PATHS = 1

EXPOSE 80

然后:

docker run -p 4000:80 app-temp1

ERROR ( message:Cannot find requested collection element. ) Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"

1 个答案:

答案 0 :(得分:0)

根据这篇文章,它是按设计: https://github.com/Microsoft/aspnet-docker/issues/35

在docker IIS上,您只能使用默认的AppPool。