Skip to content

Commit a4abeda

Browse files
committed
Fix format of hosts
1 parent 2e253cf commit a4abeda

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

gefapi/services/docker_service.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,9 +1112,10 @@ def run(execution_id, image, environment):
11121112
if client is None:
11131113
raise Exception("Docker client is not available")
11141114

1115-
# Build hosts list for EC2 metadata access (instance role credentials)
1115+
# Build hosts dict for EC2 metadata access (instance role credentials)
11161116
# This allows execution containers to use boto3 with instance roles
1117-
hosts = ["169.254.169.254:169.254.169.254"]
1117+
# For Docker Swarm services, hosts must be a dict {hostname: ip_address}
1118+
hosts = {"169.254.169.254": "169.254.169.254"}
11181119

11191120
create_kwargs = {
11201121
"image": f"{REGISTRY_URL}/{image}",

0 commit comments

Comments
 (0)