From 8935412b188d654b9b86da67b101ffc57fcfc75b Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Sat, 15 Jul 2023 18:09:55 +0200 Subject: [PATCH] fix DOCKER_HOST --- dnscheck/dnscheck.py | 2 +- dnscheck/orchestrator.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dnscheck/dnscheck.py b/dnscheck/dnscheck.py index aab7443..1e35d45 100644 --- a/dnscheck/dnscheck.py +++ b/dnscheck/dnscheck.py @@ -26,7 +26,7 @@ def can_find_dns_entry(dns_entry: str) -> bool: for service_endpoint_to_find in container_network_table.service_endpoints_to_reach: if DEBUG: - print(f"checking: {service_endpoint_to_find.service_name}({service_endpoint_to_find.service_id})", file=sys.stderr) + print(f"checking: {service_endpoint_to_find.service_name} ({service_endpoint_to_find.service_id})", file=sys.stderr) cur_result = ServiceEndpointCheckResult( service_name=service_endpoint_to_find.service_name, service_id=service_endpoint_to_find.service_id, diff --git a/dnscheck/orchestrator.py b/dnscheck/orchestrator.py index f3e0787..4f46cbc 100644 --- a/dnscheck/orchestrator.py +++ b/dnscheck/orchestrator.py @@ -203,7 +203,10 @@ def get_running_tasks(service): stdout=subprocess.PIPE, # debug output stderr=subprocess.PIPE, - text=True + text=True, + env={ + 'DOCKER_HOST': 'tcp://' + str(rdata.address) + ':2375' + } ) if res.returncode != 0: