Docker Community Forums

Share and learn in the Docker community.

Multicast forward from host to container? for DLNA discovery

I am trying to run a DLNA Media server in a container on Mac OS X.
I use the Docker for Mac Edge version.

The media server within the container listens on port 1900/UDP on the Multicast IP
udp 0 0*

The host on Mac OS X Sierra sees the Multicast request coming from the DLNA clients.
22:29:56.522628 IP > UDP, length 391

But within inside the container, there is no multicast traffic at all.
The container exposes the port 1900 in UDP.

I’ve tried --net=host like I typically do under linux for the same docker image/media server, but it doesn’t behave the same way on Mac OS X apparently.

Any chance there is a solution for allowing containers to receive multicast traffic on Docker for Mac?

Here’s the actual container image if interested.

For those interested, I solved my problem by running my own Ubuntu VM instance in virtual box in bridge mode and then my docker container inside with --net=host.

I run High Sierra now, not sure if it changed anything.


Hey, were you using wifi or were you plugged in?

Hi, I’ve a setup two dockers in separate terminals using

docker run -it --name node1 ubuntu:14.04 /bin/bash
docker run -it --name node2 ubuntu:14.04 /bin/bash

Then in each one, I run:

apt-get update && apt-get install iperf

Then in node 1, I run:

iperf -s -u -B -i 1

And in node 2, I run:

iperf -c -u -T 32 -t 3 -i 1

I can see the packets from node 2 show up in node 1’s console, so looks like it’s working. But I can’t send packets from my host, ie My MacBook.

i.e. From my Mac I do iperf -c -u -T 32 -t 3 -i 1 I’m not getting any response. How to send a packet to docker container multicast network from host?

did you ever figure out a way to use forward the multicast from host to the containers?