1

有没有办法从 AWS ECS 任务定义中的环境变量指定容器端口?

这是 Github Actions 使用的我的 task-definition.json

"containerDefinitions": [
    {
        "portMappings": [
            {
                "containerPort": 3037  <=== Can this come from environment variable defined below?
            }
        ],
        "essential": true,
        "environment": [
            {
                "name": "PORT",
                "value": "3037"
            }
        ]
    }
],
"requiresCompatibilities": ["EC2"]
4

0 回答 0