gpt4 book ai didi

docker - Gitlab CI-错误: Job failed: executor requires OSType=linux,,但Docker Engine仅支持OSType = windows

转载 作者:行者123 更新时间:2023-12-02 17:51:30 24 4
gpt4 key购买 nike

运行Gitlab CI管道时出现此错误。据我了解,错误表明我正在尝试在Windows docker-engine上运行Linux类型的docker镜像?但问题是我正在使用Windows docker镜像。可能是什么问题呢?

ERROR: Job failed: executor requires OSType=linux, but Docker Engine supports only OSType=windows



我的CI:
image: hello-world:nanoserver

stages:
- build

build1:
stage: build
script:
- echo "Hello world"

最佳答案

What's the difference between "Shared" and "Simple" tags?



某些图片将“简单标签”和“共享标签”部分分开
在“支持的标签和相应的Dockerfile链接”下(请参见mongo
图片示例)。

“简单标签”是“单个” Linux或Windows镜像的实例。它
通常是 list list ,其中可以包含为
其他架构;例如,mongo:4.0-xenial当前具有
amd64和arm64v8的图片。 Docker守护程序负责
为主机架构选择合适的镜像。

“共享标签”是始终指向 list list 的标签,
包括可能的多个Windows版本的某种组合
和Linux镜像跨越它们各自镜像的体系结构-
在mongo示例中,4.0标签是一个共享标签,由(
在撰写本文时)所有4.0-xenial,
4.0-windowsservercore-ltsc2016、4.0-windowsservercore-1709和4.0-windowsservercore-1803。

“简单标签”使docker运行mongo:4.0-xenial可以“正确执行
事物”跨单个平台上的体系结构(对于Linux,
mongo:4.0-xenial)。 “共享标签”使docker运行mongo:4.0可以
可以在Linux和许多不同版本的Linux上正常工作
支持的Windows(例如Windows Server Core LTSC 2016,
Docker守护程序再次负责确定
基于主机平台和版本的相应镜像)。

我建议您尝试共享标签:
image: hello-world
latest标签具有:
linux/386

windows v10.0.17134.1069/amd64

windows v10.0.17763.802/amd64

Docker将为您选择合适的产品

here中,您需要执行者 docker-windows来运行 Windows Container
因此您可以将 executor = "docker-windows"添加到运行者配置中

关于docker - Gitlab CI-错误: Job failed: executor requires OSType=linux,,但Docker Engine仅支持OSType = windows,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58769836/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com