- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
有一个问题没有出现在论坛中,这是有理由讨论的,恕我直言:为什么无法在较旧的主机系统上拉取或构建 Windows docker 镜像(即 nanoserver 2019)?在官方网站上,它被记录在案,它不兼容运行,是的: Version compatibility
但是,正如我所说,“要跑”。我不需要在旧主机系统上运行较新的 Windows 容器镜像,我只想拉取并构建它,稍后将它分发到兼容系统。
那么,有没有什么办法可以处理这个不应该出现的问题呢?
最佳答案
你错过了一件重要的事情:
即使只是做 docker build
,它也会使用容器,它使用容器来构建而不是直接在你的主机上。接下来是docker build
时的过程:
Docker 将从您在 Dockerfile 中使用 FROM
提到的基础镜像创建一个临时构建容器。
在上述临时构建容器中运行Dockerfile的所有指令。
将临时构建容器保存为图像。
所以,正如你所说,你已经看到了Version compatibility对于来自微软的容器,所以现在我想你也可以明白为什么构建也需要这个,只是因为它也会创建一个容器(只是这个临时容器将在构建后删除)。
更新:
整个故事是:
是的,在 linux 中,旧主机操作系统构建/运行新操作系统镜像/容器没有问题,因为主机和容器只是共享相同的内核,rootfs 由容器本身提供。
但是,你说的是 window ,来自 windows official ,我们可以看到下一个:
Windows Server 2016 and Windows 10 Anniversary Update (both version 14393) were the first Windows releases that could build and run Windows Server containers. Containers built using these versions can run on newer releases such as Windows Server version 1709, but there are a few things you need to know before you start.
As we've been improving the Windows container features, we've had to make some changes that can affect compatibility. Older containers will run the same on newer hosts with Hyper-V isolation, and will use the same (older) kernel version. However, if you want to run a container based on a newer Windows build, it can only run on the newer host build.
以上是老windows os无法运行新windows容器的原因。
另外,我想说的是docker build
和docker run
的道理是一样的:
docker run $theImageName
需要启动一个基于镜像 theImageName
的容器,正如微软所说,新的操作系统容器必须使用内核的新特性,所以新容器不能使用旧的windows主机。请记住,容器和主机将共享相同的内核。
并且,docker build -t xxx .
会找到包含FROM $baseImageName
的Dockerfile
,然后在其上启动一个容器image $baseImageName
,这个容器是一个临时容器。 Dockerfile 中的所有指令都将在此临时容器中执行,而不是在 docker 主机中执行。最后,这个临时构建容器将被删除,所以你没有看到这个临时容器。
因此,如您所见,docker run
和 docker build
都将启动需要利用新 windows 主机功能的容器,不能使用旧 windows 的内核.这是微软的限制,如果你已经了解了Windows上docker run
的限制,原因与Windows上的docker build
相同。
关于windows - Docker windows 版本容器兼容性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58145149/
这不是我的专业领域,所以我希望问的是正确的问题。 我们有一台滚动租用的服务器。旧服务器是32位windows服务器,新服务器是64位windows 2008 R2 SP1。 其中一个 Web 应用程序
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我已将 Oracle 数据库从 10g 迁移到 12c。从 12c 开始,oracle 不支持 PLSQL_V2_COMPATIBILITY 参数。 该参数用于: https://www.safari
开发环境db server为SqlServer 2005(开发版) 有什么方法可以确保我的 SQL 查询将在 SqlServer 2000 中运行? 此数据库设置为兼容级别“SQL Server 20
我有一个这种形式的类: public class Foo implements Serializable { private static final long serialVersionUI
我有以下代码来隐藏状态栏,取自 http://developer.android.com/training/system-ui/status.html和 Hide status bar android
我正在尝试测试 .prop() 是否方法存在于当前包含的 jQuery 中(出于兼容性原因): if(typeof $.prop === 'function') 我期望上面的条件是 true对于 jQ
当收到新消息时,我在项目中使用BroadcastChannel更改所有选项卡的标题。 问题在于它仅适用于chrome和firefox。因此,我决定使用localStorage创建一个Broadcast
我正在使用一个函数通过 FTP 将一个文件上传到我的服务器。这是我的代码并且工作正常但是创建的文件 example.json 不兼容 UTF8,因为它有 Atlético 而不是 Atlético 例
我正在使用兼容性类来构建用户代理字符串: public abstract class Compatibility { private static int sdkInt = 0; pr
我需要实现一个 C 例程来(解)压缩 gzip 格式的文件。 谁能举个例子? 我试过 zlib,但它似乎不兼容。 谢谢。 最佳答案 zlib 与 gzip 文件完全兼容,但您需要确保您使用的是面向 g
我正在使用以下 CSS 代码,它与 Chrome 完美兼容,但与 IE 浏览器不兼容 .collapse{ display:block; } .collapse + input[type="c
我的应用程序以 android Sdk 的 v10 为目标,但具有 minSdkVersion 的 v6。默认情况下,“match_parent”属性将用于宽度或高度。我应该为 fill_parent
我正在阅读有关 dynamic_cast 的内容,然后我遇到了以下语句 ( from cplusplus.com ): Compatibility note: This type of dynamic
我正在尝试在 Linux 下使用 QtCreator 构建一个用 VS 2008 编写的项目,但我遇到了很多错误: /home/ga/dev/CppGroup/MonteCarlo/main.cpp:
因此,我正在构建一个网站,用户可以在该网站上上传观看视频。我正在使用标准的 HTML5 视频播放器 ( ... )目前,我使用多个来源:MP4、OGG 和 WEBM,以实现跨浏览器兼容性 由于维护三
mozilla 和其他浏览器是否有类似-webkit-box-reflect 的属性?我无法在谷歌上找到哪些其他浏览器支持这个。因此,如果有人可以告诉我或给我链接,那就太好了。 最佳答案 这不仅可以使
我定义了一个自定义的 ValidateSet 参数属性,如下所示: Class MyValidValuesAttribute : System.Management.Automation.IValid
我使用 .net 4.0、linq 等编写 winforms 应用程序。它可以在带有 .net 2.0 的机器上运行吗? 最佳答案 不,不会。为 Framework 4.0 版编译的应用程序将要求该框
我如何专门检查 @keyframes translate3d 动画 与浏览器的兼容性? 请不要关闭这个问题,因为在问这个问题之前我已经尝试了很多 stackoverflow 解决方案。 我想检查我的网
我是一名优秀的程序员,十分优秀!