There is no host.docker.internal
provided by default on Linux. On macOS and Windows, Docker Desktop creates a virtual network bridge and provides host.docker.internal
as a hostname to allow containers to communicate with the host system. However, Linux uses a different approach for container networking, so host.docker.internal
is not automatically provided.
One solution is to use the host's IP address. Run the command ip addr show docker0
to find the IP address of the Docker bridge network. It is usually 172.17.0.1
.
Niciun comentariu:
Trimiteți un comentariu