Sending Multicast Packets from Docker Container (to multicast group)

I have an application that sends messages over UDP multicast that I’ve been attempting to put under docker. I’ve been running into much headwind trying to send multicast packets from a docker container.

I have been able to send messages through the --net=host option on running the docker container. I would, however, like to stick with a bridge configuration.

  • How to migrate an existing service docker?
  • How to launch an app via Docker on every Pull Request?
  • How to connect mysql workbench to running mysql inside docker?
  • What is the difference b/w “service docker start” and “docker -d”?
  • allow rabbitmq slave to join master
  • docker build: Returned a non-zero code: 2
  • I would like to get some insight in what needs to be done in order to publish messages through the standard docker bridge configuration. I’m attempting to publish messages on 239.9.60.250 with port 16000. I have tried publishing udp port 16000 through the following argument on docker run.

    -P 0.0.0.0:16000:16000/udp
    

    This doesn’t give me any change in behavior and my host doesn’t see any multicast traffic.

  • Mount linux image in docker container
  • Docker: Scaling Python container, memory overhead
  • Why Kafka broker connects to itself?
  • context or workdir for docker-compose
  • Apache Kafka in docker AND VirtualBox VM
  • Is it possible to have Docker On VM?
  • One Solution collect form web for “Sending Multicast Packets from Docker Container (to multicast group)”

    Docker network drivers have no IGMP/PIM support, so you should really establish a direct Layer 2 connection from the container to the physical switch/router.

    As you have found out yourself, docker’s default bridge network will not help you here.

    I haven’t tested it with multicast, but you should be able to achieve that with Pipework.

    macvlan driver should help you with your problem, but is currently experimental as of Docker Engine 1.11

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