我具有群集EC2 Linux的基本ecs配置+带有1个EC2实例的联网。
我也有简单的docker映像https://github.com/mattes/rotating-proxy。
此图片整理了http tor代理。
我想配置动态端口映射以允许在一个EC2实例上进行服务扩展任务。但是,当我配置动态端口映射并尝试运行任务(甚至没有服务,只有任务)时实例没有响应。 我已经尝试使用应用程序负载平衡器创建服务,但这没有帮助。因此,我确定问题与任务配置有关。
但是当我将任务部署到集群时,它的状态为“ RUNNING”。
这是任务的定义JSON。
{
"ipcMode": null,
"executionRoleArn": null,
"containerDefinitions": [
{
"dnsSearchDomains": null,
"logConfiguration": null,
"entryPoint": null,
"portMappings": [
{
"hostPort": 0,
"protocol": "tcp",
"containerPort": 5566
}
],
"command": null,
"linuxParameters": null,
"cpu": 0,
"environment": [
{
"name": "tors",
"value": "5"
}
],
"ulimits": null,
"dnsServers": null,
"mountPoints": [],
"workingDirectory": null,
"secrets": null,
"dockerSecurityOptions": null,
"memory": 200,
"memoryReservation": null,
"volumesFrom": [],
"image": "305605212.dkr.ecr.us-east-2.amazonaws.com/rotating-proxy",
"disableNetworking": null,
"interactive": null,
"healthCheck": null,
"essential": true,
"links": null,
"hostname": null,
"extraHosts": null,
"pseudoTerminal": null,
"user": null,
"readonlyRootFilesystem": null,
"dockerLabels": null,
"systemControls": null,
"privileged": null,
"name": "container"
}
],
"placementConstraints": [],
"memory": null,
"taskRoleArn": null,
"compatibilities": [
"EC2"
],
"taskDefinitionArn": "arn:aws:ecs:us-east-2:3056095212:task-definition/test-task:4",
"family": "test-task",
"requiresAttributes": [
{
"targetId": null,
"targetType": null,
"value": null,
"name": "com.amazonaws.ecs.capability.ecr-auth"
}
],
"pidMode": null,
"requiresCompatibilities": [
"EC2"
],
"networkMode": null,
"cpu": null,
"revision": 4,
"status": "ACTIVE",
"volumes": []
}