How does a docker container communicate with the host?

we have a host on which there is a process listening on port 7052.

we also have a container on this host running a service and this service needs to connect to the process running on host at port 7052.

how will it do that? if we use then would map to the docker container itself.

Have you tried using the IP of the host?

yes, that worked. i was confused for a while how to get that IP.

Glad that helped. In general: you might be able to use “ip address” on the host, depending on which Linux distro you’re using for the host, or in Windows you can open a CMD prompt and type “ipconfig”. If you’re on a Mac you can, uh, Google it, 'cause I dunno how to get the IP of a Mac. :smiley: And if you have access to your router DHCP interface, it can probably tell you what IP it’s assigned to the host.