asp.net - 在 ECS 中使用哪个 ASP.NET Windows 容器镜像?基本映像中的 Windows Docker 容器与 Amazon ECS 的兼容性问题
问题描述
我已经创建了一个像这样的 Dockerfile,用于部署我的 ASP.NET 应用程序:
# The `FROM` instruction specifies the base image. You are
# extending the `microsoft/aspnet` image.
FROM microsoft/aspnet:4.7.2-windowsservercore-1709
#WORKDIR /inetpub/wwwroot
# The final instruction copies the site you published earlier into the container.
COPY ./bin/Release/Publish/ /inetpub/wwwroot
现在根据文档,这应该使用 Windows Server build 10.0.14393。但是,当我构建此容器,将其推送到 Amazon Elastic Container Registry,然后将此容器映像部署到 Amazon Elastic Container Service [ECS](在 Windows EC2 机器上运行)时,我收到此错误:
CannotPullContainerError:基于 Windows 版本 10.0.16299 的映像与 10.0.14393 主机不兼容
有没有人成功地将 ASP.NET Windows Docker 容器部署到 Amazon ECS?如果是这样,您使用了哪个基础映像?
提前致谢!
更新:也尝试了这个基本图像,它给出了同样的错误:microsoft/aspnet:4.6.2-windowsservercore-ltsc2016
解决方案
1709 图像与 sac-2016 主机操作系统不兼容。您需要将主机操作系统升级到 1709 或将容器映像降级到 sac-2016
推荐阅读
- install4j - install4j 需要客户端系统上的 jre 吗?
- xml - 是否有任何工具可以对多个服务器的 Config xml 文件执行自动变量替换?
- c++ - 有没有更好的方法可以接收这个输入?C++
- sql - 没有附加查询的答案?
- pytorch - 为什么我在测试集上收到 Pytorch 运行时错误
- android - Android 使用 mime 类型 GIF 保存 MediaStore 图像
- c++ - PN532 试图从 Felica 标签获取设备型号
- powershell - 如何使用 powershell 脚本从保存的文件中恢复 Windows 中的语言设置?
- c# - 如何通过 Autofac 模块配置 Masstransit 消费者
- html - 使不同 Flexbox 列中的行具有相同的高度