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: https://serverfault.com/questions/844480/connect-windows-container-to-linux-container-running-on-same-docker-host

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:

  • coreos docker-compose v2: exposed port filtered behind Firewall and unreachable
  • Configure docker daemon logs
  • Docker calling unit tests
  • Error instantiating Spring Configuration class from properties file when running in Docker container
  • Docker run can't run python image- IndentationError: expected an indented block
  • connecting to a docker-compose mysql container denies access but docker running same image does not
  • 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:
    http://localhost:8080/#/

    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:

    amqp://guest:guest@172.27.192.1:5672/
    

    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.

  • Ready to run docker images for Spring Cloud Data Flow
  • Inject code/files directly into a container in Kubernetes on Google Cloud Engine
  • Publishing docker swarm mode port only to localhost
  • Docker: Could not get container for XXX
  • How can I remove a <none> tag without deleting the docker image itself?
  • How do I modify a startup script in a docker container when it is stopped?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.