1

我正在尝试使用 Kaniko/Gitlab 创建一个 Windows Docker 容器。
这是我看到的错误:

Resolving secrets
00:00
Preparing the "docker-windows" executor
Using Docker executor with image gcr.io/kaniko-project/executor:v1.6.0-debug ...
Pulling docker image gcr.io/kaniko-project/executor:v1.6.0-debug ...
WARNING: Failed to pull image with policy "always": no matching manifest for windows/amd64 10.0.17763 in the manifest list entries (docker.go:147:0s)
ERROR: Preparation failed: failed to pull image "gcr.io/kaniko-project/executor:v1.6.0-debug" with specified policies [always]: no matching manifest for windows/amd64 10.0.17763 in the manifest list entries (docker.go:147:0s)

这是 .gitlab-ci.yml 文件的普通文本:


image: 
name: microsoft/iis:latest
entrypoint: [""]



.build_variables: &build_variables
TAG: "docker-base-windows-2019-std-core"
AWS_ACCOUNT: "XXXXXXXXXX"
AWS_REGION: "XXXXXXX"
REGISTRY: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

.build_script: &build_script
script:
  - echo "{\"credsStore\":\"ecr-login\"}" > /kaniko/.docker/config.json
  - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile  --destination $REGISTRY:$TAG

stages:
- build-docker-image

build_image_dev:
variables:
  <<: *build_variables
stage: build-docker-image
image:
  name: gcr.io/kaniko-project/executor:v1.6.0-debug
  entrypoint: [""]
tags: ['XXXXX']
<<: *build_script
rules:
  - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
  - if: '$CI_COMMIT_BRANCH == "main"'
  - if: $CI_COMMIT_TAG

这是 Docker 文件的普通文本代码:


FROM Microsoft/iis:latest
CMD [ "cmd" ]
4

1 回答 1

0

你有错误:

no matching manifest for windows/amd64 

这意味着找不到特定的图像。例如,如果您在 Windows 上开发并且您的服务器是 linux,就会发生这种情况。

此错误意味着您的主机操作系统与您尝试提取的操作系统 docker 映像不兼容。

于 2021-05-21T15:00:19.557 回答