查看Docker QuickStart的源代码
←
Docker QuickStart
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
=== IIS === Create a Dockerfile with your website <pre> FROM mcr.microsoft.com/windows/servercore/iis RUN powershell -NoProfile -Command Remove-Item -Recurse C:\inetpub\wwwroot\* WORKDIR /inetpub/wwwroot COPY content/ . </pre> You can then build and run the Docker image: $ docker build -t iis-site . $ docker run -d -p 8000:80 --name my-running-site iis-site There is no need to specify an ENTRYPOINT in your Dockerfile since the microsoft/iis base image already includes an entrypoint application that monitors the status of the IIS World Wide Web Publishing Service (W3SVC). Verify in the browser With the current release, you can't use http://localhost to browse your site from the container host. This is because of a known behavior in WinNAT, and will be resolved in future. Until that is addressed, you need to use the IP address of the container. Once the container starts, you'll need to finds its IP address so that you can connect to your running container from a browser. You use the docker inspect command to do that: <source lang=bash> docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" my-running-site </source> You will see an output similar to this: 172.28.103.186 You can connect the running container using the IP address and configured port, http://172.28.103.186:8000 in the example shown. In addition to static content, IIS can run other workloads including but not limited to ASP.NET, ASP.NET Core, NodeJS, PHP, and Apache Tomcat. For a comprehensive tutorial on running an ASP.NET app in a container, check out the tutorial on the docs site. [https://docs.microsoft.com/zh-cn/aspnet/mvc/overview/deployment/docker-aspnetmvc 将 ASP.NET MVC 应用程序迁移到 Windows 容器] <br><br>
返回到
Docker QuickStart
。
个人工具
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面