79352687

Date: 2025-01-13 15:34:09
Score: 1
Natty:
Report link

Use host as host.docker.internal as prometheus-exporter running as container and in order for it to access something which is running on same machine but not in same container(containerized application).

How host.docker.internal Works Purpose: It resolves to the host machine's IP address, allowing containers to communicate with services running on the host. Availability:

  1. Supported in Docker Desktop for Windows and macOS. In Linux, it may not be available by default, but similar functionality can be achieved by configuring the Docker network or using host networking (--network="host").
Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Himanshu Joshi