在谷歌容器registry中使用Amazon ECS

当我尝试使用AWS ECS与私人谷歌容器registry我的任务总是在挂起状态。 根据AWS文档,我在容器定义中添加了envvariables

ECS_ENGINE_AUTH_TYPE=dockercfg ECS_ENGINE_AUTH_DATA= {"https://eu.gcr.io": { "email": "not@val.id", "auth": "some hash" }} 

但是我得到这个错误

 "CannotPullContainerError: Error: image not found" 

我的完整任务定义

 { "requiresAttributes": [], "taskDefinitionArn": "arn:aws:ecs:eu-west-1:745964170259:task-definition/test:2", "status": "ACTIVE", "revision": 2, "containerDefinitions": [ { "volumesFrom": [], "memory": 128, "extraHosts": null, "dnsServers": null, "disableNetworking": null, "dnsSearchDomains": null, "portMappings": [ { "hostPort": 80, "containerPort": 80, "protocol": "tcp" } ], "hostname": null, "essential": true, "entryPoint": null, "mountPoints": [], "name": "nginx_test", "ulimits": null, "dockerSecurityOptions": null, "environment": [ { "name": "ECS_ENGINE_AUTH_TYPE", "value": "dockercfg" }, { "name": "ECS_ENGINE_AUTH_DATA", "value": "{\"https://eu.gcr.io\":{\"auth\":\"somehash\",\"email\":\"not@val.id\"}}" } ], "links": null, "workingDirectory": null, "readonlyRootFilesystem": null, "image": "eu.gcr.io/project_id/image_name", "command": null, "user": null, "dockerLabels": null, "logConfiguration": null, "cpu": 0, "privileged": null } ], "volumes": [], "family": "test" } 

什么是这个案件的正确的任务定义?

应为ECS代理程序指定ECS_ENGINE_AUTH_TYPEECS_ENGINE_AUTH_DATA环境variables,而不是在任务定义中指定。 文档中有关于如何使用私人registry的说明。