!IIS Docker 镜像
docker pull mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2025
https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2025/Dockerfile
docker pull mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2022
https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2022/Dockerfile
docker pull mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2019
https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2019/Dockerfile
docker pull mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2016
https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2016/Dockerfile
Internet Information Services (IIS) for Windows® Server 是一款灵活、安全且可管理的 Web 服务器,用于托管 Web 上的任何内容。
DockerfileFROM mcr.microsoft.com/windows/servercore/iis RUN powershell -NoProfile -Command Remove-Item -Recurse C:\inetpub\wwwroot\* WORKDIR /inetpub/wwwroot COPY content/ .
然后您可以构建并运行 Docker 镜像:
$ docker build -t iis-site . $ docker run -d -p 8000:80 --name my-running-site iis-site
您无需在 Dockerfile 中指定 ENTRYPOINT,因为 microsoft/iis 基础镜像已包含入口点应用程序 ServiceMonitor.exe,它会监控 IIS World Wide Web Publishing Service (W3SVC) 的状态。
注意: Service Monitor 的下载位置已更改。现在可从 https://github.com/microsoft/IIS.ServiceMonitor/releases 获取。原始位置 [***] 将于 2025-06-10 移除。有关更多信息,请参见 https://github.com/dotnet/announcements/issues/351%E3%80%82
在当前版本中,您无法使用
http://localhost从容器主机浏览网站。这是由于 WinNAT 中的已知行为,将在未来版本中解决。在此之前,您需要使用容器的 IP 地址。
容器启动后,您需要找到其 IP 地址,以便从浏览器连接到正在运行的容器。使用 docker inspect 命令执行此操作:
docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" my-running-site
您将看到类似以下的输出:
172.28.103.186
您可以使用 IP 地址和配置的端口连接运行中的容器,例如示例中的 http://172.28.103.186:8000。
除静态内容外,IIS 还可以运行其他工作负载,包括但不限于 ASP.NET、ASP.NET Core、NodeJS、PHP 和 Apache Tomcat。
有关在容器中运行 ASP.NET 应用程序的综合教程,请查看 文档站点上的教程。
| 标签 | 架构 | Dockerfile | 操作系统版本 | 创建时间 | 最后更新时间 |
|---|---|---|---|---|---|
| 20251014-windowsservercore-ltsc2025 | amd64 | https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2025/Dockerfile | Windows Server 2025 | 10/14/2025 | 10/14/2025 |
| windowsservercore-ltsc2025 | amd64 | https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2025/Dockerfile | Windows Server 2025 | 11/12/2024 | 10/14/2025 |
| windowsservercore | amd64 | https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2025/Dockerfile | Windows Server 2025 | 11/15/2018 | 10/14/2025 |
| latest | amd64 | https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2025/Dockerfile | Windows Server 2025 | 11/15/2018 | 10/14/2025 |
| 20251014-windowsservercore-ltsc2022 | amd64 | https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2022/Dockerfile | Windows Server 2022 | 10/14/2025 | 10/14/2025 |
| windowsservercore-ltsc2022 | amd64 | https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2022/Dockerfile | Windows Server 2022 | 08/18/2021 | 10/14/2025 |
| windowsservercore | amd64 | https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2022/Dockerfile | Windows Server 2022 | 11/15/2018 | 10/14/2025 |
| latest | amd64 | https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2022/Dockerfile | Windows Server 2022 | 11/15/2018 | 10/14/2025 |
| 20251014-windowsservercore-ltsc2019 | amd64 | https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2019/Dockerfile | Windows Server 2019 | 10/14/2025 | 10/14/2025 |
| windowsservercore-ltsc2019 | amd64 | https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2019/Dockerfile | Windows Server 2019 | 11/15/2018 | 10/14/2025 |
| windowsservercore | amd64 | https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2019/Dockerfile | Windows Server 2019 | 11/15/2018 | 10/14/2025 |
| latest | amd64 | https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2019/Dockerfile | Windows Server 2019 | 11/15/2018 | 10/14/2025 |
| 20251014-windowsservercore-ltsc2016 | amd64 | https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2016/Dockerfile | Windows Server 2016 | 10/14/2025 | 10/14/2025 |
| windowsservercore-ltsc2016 | amd64 | https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2016/Dockerfile | Windows Server 2016 | 11/15/2018 | 10/14/2025 |
| windowsservercore | amd64 | https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2016/Dockerfile | Windows Server 2016 | 11/15/2018 | 10/14/2025 |
| latest | amd64 | https://github.com/Microsoft/iis-docker/blob/main/windowsservercore-ltsc2016/Dockerfile | Windows Server 2016 | 11/15/2018 | 10/14/2025 |
| 标签 | 架构 | 操作系统 | 操作系统版本 | 创建时间 | 最后更新时间 |
|---|---|---|---|---|---|
| windowsservercore | amd64 | Windows | Windows Server 2016, Windows Server 2019, Windows Server 2022, Windows Server 2025 | 11/15/2018 | 10/14/2025 |
| latest | amd64 | Windows | Windows Server 2016, Windows Server 2019, Windows Server 2022, Windows Server 2025 | 11/15/2018 | 10/14/2025 |
您可以在 [***] 获取 windows/servercore/iis 的所有可用标签列表。
每个标签将在标签引用的操作系统版本的生命周期内得到支持。有一些例外情况:
包含时间戳的标签将支持到为 Windows Server 版本发布更新的时间戳为止。这通常在每月的 "补丁星期二" 发生。
多架构标签 'latest' 和 'windowsservercore' 将引用镜像发布时最新版本的 Windows Server Core。
'windowsservercore-ltsc*' 将引用镜像发布时标签所引用的最新版本的 Windows Server Core。
当操作系统版本达到生命周期结束 (EOL) 时,其标签将不再维护。
一旦标签不再维护,将被视为不受支持,并且不再更新。不受支持的标签将保留在容器注册表中,以防止破坏对它们的任何引用。
'latest' 和 'windowsservercore' - 多架构标签将在 Windows Server Core 版本的生命周期内得到支持,前提是使用镜像的最新发布版本。
'windowservercore-ltsc2022' - 将在 Windows Server Core LTSC 2022 版本的生命周期内得到支持,前提是使用镜像的最新发布版本。
'20250408-windowsservercore-ltsc2025' - 仅支持到为 Windows Server Core 版本发布更新的时间戳为止。
如果您有任何问题或疑虑,请通过 https://github.com/Microsoft/iis-docker/issues/new 与我们联系。
MICROSOFT 软件补充许可条款
容器操作系统镜像
Microsoft Corporation(或根据您的居住地,其关联公司之一)(简称“我们”或“Microsoft”)向您授予本容器操作系统镜像补充件(“补充件”)的许可。您被许可将本补充件与基础主机操作系统软件(“主机软件”)结合使用,仅用于协助运行主机软件中的容器功能。主机软件许可条款适用于您对补充件的使用。如果您没有主机软件的许可证,则不得使用本补充件。您可以将本补充件与每个有效许可的主机软件副本一起使用。
附加许可要求和/或使用权利
您按照前述段落指定的方式使用补充件可能会导致创建或修改包含某些补充件组件的容器镜像(“容器镜像”)。为明确起见,容器镜像与虚拟机或虚拟设备镜像是分开且不同的。根据这些许可条款,我们授予您有限的权利,在以下条件下重新分发此类补充件组件:
(i) 您只能在容器镜像中并作为容器镜像的一部分使用补充件组件,
(ii) 您可以在容器镜像中使用此类补充件组件,前提是您的容器镜像中具有与补充件明显分开且不同的重要主要功能;并且
(iii) 您同意在容器镜像中包含这些许可条款(或我们或托管方要求的类似条款),以适当许可您的最终用户可能使用的补充件组件。
对于本文未明确授予的所有其他权利,我们保留所有权利。
使用本补充件即表示您接受这些条款。如果您不接受这些条款,请不要使用本补充件。
作为本 Windows 容器的容器操作系统镜像补充许可条款的一部分,您还需遵守基础 Windows Server 主机软件许可条款,该条款位于 [***]
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。





探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务