amazon-web-services - 弹性云服务器 "InternalError: failed to normalize image reference"

标签 amazon-web-services docker amazon-ecs amazon-ecr

我们有一个 docker 镜像存储在 ECR 中,有些来自 TC 构建代理,有些来自本地开发人员机器上的构建。所有镜像都可以在本地拉取运行,但是当尝试启动构建在构建 TC 构建代理上的镜像时,当 ECS 集群开始运行任务时,我们会收到以下错误。InternalError: failed to normalize image reference "http://xxx.eu-west-1.amazonaws.com/events/name-of-contianer:tag"我似乎无法在日志中找到任何其他信息,也无法在任何 ECS 文档中提及标准化错误。有没有人遇到过这个错误,甚至知道它意味着什么!

ECS 任务定义:

{
  "ipcMode": null,
  "executionRoleArn": "arn:aws:iam::xxxxxxxxxxxx:role/ecsTaskExecutionRole",
  "containerDefinitions": [
    {
      "dnsSearchDomains": null,
      "environmentFiles": null,
      "logConfiguration": null,
      "entryPoint": null,
      "portMappings": [
        {
          "hostPort": 80,
          "protocol": "tcp",
          "containerPort": 80
        }
      ],
      "command": null,
      "linuxParameters": null,
      "cpu": 0,
      "environment": [
        {
          "name": "ServiceConfiguration__BasePath",
          "value": "/mobile-read-model"
        },
        {
          "name": "ServiceConfiguration__Version",
          "value": "0.1.0"
        }
      ],
      "resourceRequirements": null,
      "ulimits": null,
      "dnsServers": null,
      "mountPoints": [],
      "workingDirectory": null,
      "secrets": null,
      "dockerSecurityOptions": null,
      "memory": null,
      "memoryReservation": null,
      "volumesFrom": [],
      "stopTimeout": null,
      "image": "http://xxxxxxxxxxxx.dkr.ecr.eu-west-1.amazonaws.com/events/mobile-app-read-model:0.1.0-blank-read-model0011",
      "startTimeout": null,
      "firelensConfiguration": null,
      "dependsOn": null,
      "disableNetworking": null,
      "interactive": null,
      "healthCheck": {
        "retries": 1,
        "command": [
          "CMD-SHELL",
          "curl -f http://localhost/health || exit 1"
        ],
        "timeout": 5,
        "interval": 30,
        "startPeriod": 60
      },
      "essential": true,
      "links": null,
      "hostname": null,
      "extraHosts": null,
      "pseudoTerminal": null,
      "user": null,
      "readonlyRootFilesystem": false,
      "dockerLabels": null,
      "systemControls": null,
      "privileged": null,
      "name": "mobile-read-model"
    }
  ],
  "placementConstraints": [],
  "memory": "512",
  "taskRoleArn": "arn:aws:iam::xxxxxxxxxxxx:role/ecsTaskExecutionRole",
  "compatibilities": [
    "EC2",
    "FARGATE"
  ],
  "taskDefinitionArn": "arn:aws:ecs:eu-west-1:xxxxxxxxxxxx:task-definition/mobile-app-readmodel:55",
  "family": "mobile-app-readmodel",
  "requiresAttributes": [
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "com.amazonaws.ecs.capability.task-iam-role"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "ecs.capability.container-health-check"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "ecs.capability.task-eni"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "com.amazonaws.ecs.capability.docker-remote-api.1.29"
    }
  ],
  "pidMode": null,
  "requiresCompatibilities": [
    "FARGATE"
  ],
  "networkMode": "awsvpc",
  "cpu": "256",
  "revision": 55,
  "status": "ACTIVE",
  "inferenceAccelerators": null,
  "proxyConfiguration": null,
  "volumes": []
}

最佳答案

image属性应该是:"image": "xxxxxxxxxxxx.dkr.ecr.eu-west-1.amazonaws.com/events/mobile-app-read-model:0.1.0-blank-read-model0011",没有 http:// .

关于amazon-web-services - 弹性云服务器 "InternalError: failed to normalize image reference",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66384815/

相关文章:

containers - 如何使用 AWS 控制台/GUI 在已创建的 ECS Fargate 上启用容器洞察

amazon-web-services - 在您的集群中未找到任何容器实例

android - AWS Android 项目登录

amazon-web-services - 在 CloudFormation 中获取 AWS::MSK::Configuration 的最新版本

docker - 如何为 “RUN”命令的交互式命令填写用户输入?

docker - 从travis部署到Digital Ocean Droplet

amazon-web-services - Route 53 A 记录需要多长时间更新?

amazon-web-services - AWS CodePipeline 无法访问组织的存储库

postgresql - docker postgres 无法从指定端口启动

docker - Netflix | Spring Cloud Eureka部署在ECS上时未注册