Skip to content

Commit 9c28295

Browse files
committed
Add support for new DockerID attribute.
Maintain backwards compatility.
1 parent 88764b5 commit 9c28295

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docker/common/ecs-get-port-mapping.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def get_local_container_info():
5050

5151
if contains_key(ecs_local_task, 'Containers'):
5252
for c in ecs_local_task['Containers']:
53-
if c['DockerId'] == docker_id:
53+
container_docker_id = c.get('DockerId') or c.get('DockerID')
54+
if container_docker_id == docker_id:
5455
ecs_local_container = c
5556

5657
if ecs_local_container is None:

0 commit comments

Comments
 (0)