Skip to main content

Docker Compose with mDNS

FDM Monster provides container images with mDNS support, which requires the use of the Docker macvlan network driver. As a result, this functionality is limited to hosts running a Linux operating system.

Quick Start

Before setting up FDM Monster with mDNS you will need the following information.

  • A name for the Docker network to create (you can use an existing macvlan network).
  • The device label to bind the macvlan network to. For multi-homed systems ensure the device is on the network which will host FDM Monster.
  • The network address in CIDR notation that the macvlan network will be part of (should match the network of the device).
  • The network range in CIDR notation that specifies IP addresses available to containers attached to the macvlan network.
  • The default gateway of the host interface.
  • The IP address to assign to the container.

Our setup script can create the required macvlan network and a functional docker-compose.yml. Download the FDM Monster helper script here: macvlan-setup.sh

Execute the script and respond to the prompts.

Run the container

docker compose -f FDMM-mDNS-docker-compose.yml up -d

Use your favorite browser to access http://fdmmonster.local

Changes needed in docker-config.yml

The mDNS version requires use of docker's macvlan diver and minor changes to docker-compose.yml. Below are the important notes on these changes.

Image tags

mDNS support is available via a new image. This image can be selected by adding "-mdns" to any of the standard FMD Monster tags.

  • latest-mdns
  • x.y.z-mdns
  • main-mdns
  • develop-mdns
  • x.y.z-rc1-1234-mdns

Network defintion

Within the docker-compose.yml, you must create a network definition. The defintion label does not need to match the macvlan network name. It is simply easier, and not harmful to use the same name. The name statement must match the macvlan bridge name.

Static IP vs DHCP

The FDM Monster container image does not support DHCP address assignment. If a static IP is not explicitly assigned, Docker will automatically select the next available IP address from the bridge network’s configured range. It is strongly recommended to either assign a static IP address to the container or configure a hostname to enable mDNS-based name resolution.

It is also highly recommended that the IP range provided to the mavlan bridge be removed from any DHCP scopes to prevent duplicate IP address use on your network.

No port definition

No port definition is used in the mDNS docker-compose.yml. There are 2 reasons for this:

  • The container "lives" on the host's native network with a unique, network accessible MAC address and IP. This means that all open ports on the container are accessible on the network.
  • Port mapping is not supported by the macvlan driver.