【问题标题】:In Azure DevOps, my ECR push image task fails after a few tries with no insight在 Azure DevOps 中,我的 ECR 推送映像任务在几次尝试后失败,但没有洞察力
【发布时间】:2022-09-25 00:50:03
【问题描述】:
- task: Docker@2
  displayName: Build an image
  inputs:
    command: build
    repository: weather-update-project
    dockerfile: \'**/Dockerfile\'
    buildContext: \'$(Build.SourcesDirectory)\'
    tags: \'latest\'

- task: ECRPushImage@1
  inputs:
    awsCredentials: \'weather\'
    regionName: us-west-2
    imageSource: \'imagename\'
    sourceImageName: \'weather-update-project\'
    sourceImageTag: \'latest\'
    pushTag: \'latest\'
    repositoryName: \'weather-update-project\'

我正在构建一个图像,然后尝试将该图像推送到 ECR。当它到达 ECR 推送映像任务时,它尝试推送几次,然后给我错误“进程 \'/usr/bin/docker\' failed with exit code 1\”,就是这样.我的日志中没有其他关于通常存在的错误的信息。可能发生什么?我的 ECR 是公开的,我的所有凭据都是正确的。这是我在 Azure DevOps 中用于 docker build 和 ecrpushimage 任务的 YAML 代码

包含我的 dockerfile 的存储库名称是 \'weather-update-project\' 并且我的 ECR 存储库也有名称 \'weather-update-project\'

    标签: docker azure-devops yaml azure-pipelines amazon-ecr


    【解决方案1】:

    您能否验证它在哪个代理上运行以及 Docker 是否存在? 图像是否正确创建?

    在开始执行 ECRPushImage 任务时,它应该至少显示如下配置日志,如果没有,则它与该代理上的 docker 相关。

    Configuring credentials for task
    ...configuring AWS credentials from service endpoint 'xxxxxxxxxxxx'
    ...endpoint defines standard access/secret key credentials
    Configuring region for task
    ...configured to use region us-east-1, defined in tas
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-19
      • 2019-10-01
      • 1970-01-01
      • 2020-09-28
      • 2021-05-10
      • 1970-01-01
      相关资源
      最近更新 更多