Skip to content

Commit 4196043

Browse files
authored
Force aws-ecs-agent to use the Host networking
According to Amazon's documentation in [step 10](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-install.html), the ECS-Agent is only supported if running using the Host networking instead of bridge. I also enabled Task IAM Role by default, to synchronize with the documentation update in rancher/docs#2015
1 parent c845622 commit 4196043

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

a/amazon-ecs-agent.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ ecs-agent:
77
- /opt/var/lib/ecs/data:/data
88
- /sys/fs/cgroup:/sys/fs/cgroup:ro
99
- /var/run/docker/execdriver/native:/var/lib/docker/execdriver/native:ro
10-
ports:
11-
- "127.0.0.1:51678:51678"
12-
- "127.0.0.1:51679:51679"
10+
net: host
1311
environment:
12+
- ECS_ENABLE_TASK_IAM_ROLE=true
13+
- ECS_ENABLE_TASK_IAM_ROLE_NETWORK_HOST=true
1414
- ECS_LOGFILE=/log/ecs-agent.log
1515
- ECS_LOGLEVEL=info
1616
- ECS_DATADIR=/data

0 commit comments

Comments
 (0)