Docker container could not establish connection to outside VM

I have hosted my app on JBoss eap 7 inside a docker container.When app deployed on host machine it can connect to DB server(which is on another VM),but the same is not able to connect when inside docker continer. Need Help!!