amazon-ecs - 无法使用 docker hub 私有存储库映像注册 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”,必须是以下之一:name、image、cpu、memory、memoryReservation、links、portMappings、essential、entryPoint、command、environment、mountPoints、volumesFrom、linuxParameters、hostname、user、workingDirectory , disableNetworking, privileged, readonlyRootFilesystem, dnsServers, dnsSearchDomains, extraHosts, dockerSecurityOptions, dockerLabels, ulimits, logConfiguration, healthCheck
aws 文档没有更新吗?我希望它是最新的。
解决方案
推荐阅读
- python-3.x - Selenium 浏览器窗口未退出
- java - 使用socket服务器和des算法加解密
- python - 绘制宽度较小的 pygame 矩形
- html - 如何避免动画元素在放大页面时扩展页面
- python - what is the order of mathematical calculations in python?
- kubernetes - Ubuntu 20.04 qemu-kvm 共享文件夹
- amazon-athena - 我需要在 Athena AWS 中使用 INSTR
- javascript - 模糊页面上所有输入的最佳方法?
- excel - 在 excel vba 中排序时出现应用程序错误
- php - 尝试从数据库表中进行基本减法