title: Expose mongo port in other container
body: <p>I have this (custom) container which runs a java program which requires mongo locally. Now, with docker I would like to setup mongo in its own container. So I guess, in order to expose this 27017 port locally in this java-container I need to setup an SSH-tunnel, right ? If there is a easier way please let me know. </p>
  
  <p>So, there is this official <a href="https://hub.docker.com/_/mongo/" rel="nofollow noreferrer">mongo image</a> image, but I get the impression <code>ssh</code> is not install or running. What would be the best approach to do this?</p>
  
  <p>UPDATE: I've rephrased the question more focussed on port-forwarding <a href="https://stackoverflow.com/questions/39633057/ssh-port-forwarding-in-docker">here</a></p>