Connect Windows container to Linux container running on same Docker host

Originally asked on ServerFault since I think this is a networking question, but was told to move here:

I have RabbitMQ running in a Linux container and I want to connect to it from a Windows container, both containers are running on the same host, a Windows 10 PC.
I start RabbitMQ like this:

  • Can't install supervisor on a Docker container ubuntu:trusty
  • Cannot connect to MySQL Docker container from another machine on Mac OS X
  • Mount remote docker instance to my OSX file system
  • Nginx doesn't run with my dockers containers
  • Unable to push docker image to amazon ECR
  • Docker Registry vs Docker “Trusted” Registry
  • docker run -p 8080:15672 -p 5672:5672 -d --hostname my-rabbit --name some-rabbit rabbitmq:3-management

    I’m able to view RabbitMQ’s web management app from the host PC here:

    I switch to Windows container mode (using the little Whale icon) and start my Windows container like so:

    docker run --name "whatever" -d "whatever"

    At this point I can connect to RabbitMQ by using the default gateway IP assigned to the Windows container. My connection string looks like this:


    Works fine, but I prefer to use hostnames, and also not tunnel through the host if I can avoid it (I had to add a firewall exception to make this work). For talking between my various Windows containers I can use hostnames if I run each container with a unique –hostname value, but that does not appear to work across Windows and Linux containers. I tried adding a new network to my Linux containers with the same subnet as the Windows containers, but that did not help.
    I’ve read a little about swarms and other more advanced/newer options, but currently I’m focusing on all of my containers running on one host (this is for QA efforts, not production). I want to make it as easy as possible for SDETs and others to pull down multiple containers, run a couple BAT files or PowerShell scripts and have everything talking nicely — without modifying IP addresses in config files, or worrying about conflicting networking setups. Pretty much what I can easily do if I was only using Linux containers, or only using Windows containers, but I need to use both.

  • docker Unable to connect to [IP: 80]
  • (dockerfile) for flag -v: bad mode specified
  • Making the Docker Registry HA
  • What is the convention to include supporting services in a project that uses docker?
  • vagrant variables in Dockerfile
  • Docker:issue faced while running two web apps inside docker
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.