无法使用Docker Hub私有存储库映像注册ECS任务

时间:2019-01-22 04:27:58

标签: amazon-ecs

我想使用私有Docker Hub仓库中的Docker镜像运行ECS任务。

我已遵循本文档https://docs.aws.amazon.com/AmazonECS/latest/developerguide/private-auth.html中的所有说明。

然后我创建了一个任务定义json:

{
  "containerDefinitions": [
    {
      "name": "signage-next-graphql",
      "image": "docker.io/private/next-graphql:latest",
      "repositoryCredentials": {
        "credentialsParameter": "arn:aws:secretsmanager:us-east-2: 385945872227:secret:dockerhub-personal-pTsU9e"
      },
      "memory": 500,
      "essential": true,
      "portMappings": [
        {
          "hostPort": 5000,
          "containerPort": 5000
        }
      ]
    }
  ],
  "volumes": [],
  "memory": "900",
  "cpu": "128",
  "placementConstraints": [],
  "family": "next-graphql",
  "executionRoleArn": "arn:aws:iam::385945872227:role/ecsTaskExecutionRole",
  "taskRoleArn": ""
}

运行aws ecs register-task-definition --family "${ECS_TASK_FAMILY}" --cli-input-json "file://./ecsTaskDefinition.json" --region "${AWS_TARGET_REGION}"时出现错误;

  

containerDefinitions [0]中的未知参数:“ repositoryCredentials”,   必须是以下之一:名称,图像,CPU,内存,memoryReservation,链接,   portMappings,必不可少的,entryPoint,命令,环境,   mountPoints,volumeFrom,linuxParameters,主机名,用户,   workingDirectory,disableNetworking,特权,   readonlyRootFilesystem,dnsServers,dnsSearchDomains,extraHosts,   dockerSecurityOptions,dockerLabels,ulimits,logConfiguration,   healthCheck

aws文档是否未更新?我希望它是最新的。

0 个答案:

没有答案