Issue in connecting client container (reside on VM) to server container ( reside on Openstack VM)

I have the following scenario, I have two file client and server file which is containerised using docker containers. Client container is residing on a VM using a virtual box (network set using NAT and host-only adapter) and server container is residing on OpenStack VM.
The IP address of the server is 192.168.160.39 and the VM machine IP address is enp0s8:192.168.56.108.
I am running the docker container client as

docker run --rm -it -p 192.168.56.108:5555:5555 client bash

and running server docker container as

docker run --rm -it -p 5555:5555 server bash 

also tried with the IP, but when I used ip I retrieve cannot bind address

docker run --rm -it -p 192.168.160.39:5555:5555 server bash

Client.py

context = zmq.Context()
#Socket to talk to server
socket = context.socket( zmq.REQ )
socket.connect( "tcp://192.168.160.39:5555" )
name = "Max"
while True:
  message = input( "Message: " )
  socket.send_pyobj( {1: [name, message]} )

Server.py

context = zmq.Context()
socket = context.socket(zmq.REP)
socket.bind("tcp://0.0.0.0:5555")
while True:
   #Wait for next request from client
   message = socket.recv_pyobj()
   print("%s: %s" % (message.get(1)[0], message.get(1)[1]))

I am able to access OpenStack VM by ssh from my VM using ssh -J proxy-server OpenStack VM.
for instance
ssh -J [email protected] [email protected]

My server is unable to retrieve the data from the client. Thanks, help is highly appreciated helping me in sorting out this issue.

Source: Docker Questions