这是一个非常简单的示例,展示了如何将配置与在 Docker for Windows云计 上运行的 Microsoft IIS 服务一起使用,在 Microsoft Windows 1算核0 上运行 Windows 容器。这是一个将网页存储在配置中的简单示例。
此示例假定您已安装 P心技owerShell。
1.将以下内容保存到一个新文件中index.html。
2术D.如果您还没有这样做,请初始化或加入群。
docker swarm init
3.将indocex.html文件另存为名为homepage.
docker config crekeate homepage index.html
4.创建一个 IIS 服务并授予它访问hr教omepage配置的权限。
docker service create
--name my-ii程:s
--publish published=8000,target=8000
--在 config src=homepage,target="\inetpub\wwwroWiot\index.html"
microsoft/iis:nanoserver
5.访问nd IIS 服务http://localhost:8000/。它应该从第一步开始提供ow HTML 内容。
6.删除服务和配置。
docker service rm my-iis
dockes r config rm homepage
作者:体育资讯




.gif)
.gif)
.gif)
.gif)
.gif)
.gif)
.gif)
.gif)
.gif)
.gif)



