Docker – Karaf image with Mongo Image

I have created the karaf dockerfile from scratch and it works with my application. Now, the postgreSQL and the MongoDB containers need to be running on the same network as the karaf container for the final step. Essentially, what i have so far is three separate dockerfiles. And what i need is for them to be able to communicate with each other. How do i approach this?

  • How to install ffmpeg for ubuntu using command line?
  • Docker commands fails (in Windows)
  • Docker Container Usage
  • Could not find rake-11.1.2 in rails docker container
  • Static webpage on Nginx Docker Container Missing CSS
  • How to join the default bridge network with docker-compose?
  • Connection was reset on a flask web app
  • Docker container failing to pull git repo
  • Docker mount S3 container
  • how do I get vertical bars to show up properly in tmux running in docker?
  • How to get IP address of docker container in jenkins?
  • docker-credential-osxkeychain wants to use your confidential information
  • One Solution collect form web for “Docker – Karaf image with Mongo Image”

    Use docker network ls command firstly, it will show the networks exist in the machine.
    Then run your MongoDB container and set --net param.

    docker run --net karaf_default mongo

    The mongo and karaf will be in the same network now. (you can check doc of --link)

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.