Skip to content

Commit

Permalink
fix DOCKER_HOST
Browse files Browse the repository at this point in the history
  • Loading branch information
s4ke committed Jul 15, 2023
1 parent 29b8bda commit 8935412
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dnscheck/dnscheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 4 additions & 1 deletion dnscheck/orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8935412

Please sign in to comment.