IP of a machine in the network of the host machine

Hello everyone,

Imagine I have 2 servers in the same network: A & B. A is hosting a docker container, and I want to be able to connect to server B from within the docker container running on A host. How can I go about doing that?

Are both docker hosts? Are they standalone or in the same swarm cluster?

Furthermore, can you explain what you tried and where you see the challenge?