但是要运行
aws ecs register-task-definition --family --container-definitions wordpress file: //wordpress.json"
在下面给出以下错误:
Error parsing parameter '--container-definitions': Invalid JSON: Expecting object: line 1 column 1 (char 0)
收到的JSON:{
我的wordpress.json:
{
"containerDefinitions": [
{
"name": "wordpress",
"links": [
"mysql"
],
"image": "wordpress",
"essential": true,
"portMappings": [
{
"containerPort": 80,
"hostPort": 80
}
],
"memory": 500,
"cpu": 10
},
{
"environment": [
{
"name": "MYSQL_ROOT_PASSWORD",
"value": "password"
}
],
"name": "mysql",
"image": "mysql",
"cpu": 10,
"memory": 500,
"essential": true
}
],
"family": "wordpress"
}
有什么建议么?
最佳答案
用于注册任务的正确的aws cli命令是aws ecs register-task-definition --cli-input-json file://wordpress.json
关于amazon-web-services - 在Amazon Container Service上定义任务时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28793449/