Link Docker Container across the Host

My SetUP is as Below

Machine – 1 = couch docker

  • How to see the logs of running application inside docker container?
  • Communication between two flask services in Docker
  • docker-machine breaks docker native client on linux
  • Running Docker Containers on Docker Swarm using Marathon?
  • Connection Failing to Docker Container
  • Setting Rails Environment for Apache by Environment Variable
  • Machine – 2 = Web Docker

    How do I connect / link my Web docker to another systems couch docker?

    I tried Below method, but it isn’t working.

    On Machine-1

    step-1

    docker network create mynet
    

    Step -2

    docker run -v /home/user1/db:/var/lib/couchdb -p 0.0.0.0:5984:5984 --net mynet --name couch couch:latest
    

    On Machine-2

    Step – 3

     docker run  -e DB_URL=http://admin:admin@couch:5984/dbname --link couch:couch  -p 0.0.0.0:3000:3000 --net mynet --name web myweb:lates 
    

    It gives me below error

    docker: Error response from daemon: network mynet not found.
    See 'docker run --help'.
    

    Any Idea what can be done?

  • “The output of `ssh-add -l` doesn't contain 'RSA'. Start the agent, add your keys?” in Docker
  • Bind-mount a host directory into a volume of a running docker container
  • Running Tomcat with PostgreSql using Dockerfile
  • Docker on CentOS 7.2: kernel:unregister_netdevice: waiting for lo to become free. Usage count = 1
  • Redis client times out when connecting
  • How can I add a volume to an existing Docker container?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.