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:

  • When Docker image push on my linux machine unauthorized: authentication required error display
  • Docker Jenkins Image - curl: (3) Illegal characters found in URL
  • Docker - Failed to Making bundle: validate-gofmt
  • Managing mysql users in a Docker environment
  • Container exits if invoked from compose
  • Postgres image from docker can't find initdb. What am I missing?
  • 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 compose getting stuck
  • docker Error response from daemon: json: cannot unmarshal object into Go value of type []string
  • docker nodejs container cant connect mysql container
  • How to dynamically change the docker's base image
  • Adding an ECS instance in AWS - where to set the cluster name
  • docker container not available at port 80 like it should
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.