DHCP Option 43 (Vendor Specific Information) and Unifi AP

I would like to run a Unifi Controller as a Docker container in the future. The problem is, of course, that the "Auto Adoption" no longer works.

With the DHCP option 43, a layer 3 adoption should be possible. Unfortunately, even after hours of searching, I haven't found out what the format should be for the Unifi APs. I know that it has to be the IP (HEX) and that it needs a suboption and the length.

Has anyone of you already got this working?

At the moment it looks like this for me:

remo@P14s ~ $ sudo nmap --script broadcast-dhcp-discover
[sudo] Passwort für remo: 
Starting Nmap 7.80 ( https://nmap.org ) at 2021-07-18 06:50 CEST
Pre-scan script results:
| broadcast-dhcp-discover: 
|   Response 1 of 1: 
|     IP Offered: 192.168.0.249
|     DHCP Message Type: DHCPOFFER
|     Server Identifier: 192.168.0.1
|     IP Address Lease Time: 2m00s
|     Renewal Time Value: 1m00s
|     Rebinding Time Value: 1m45s
|     Subnet Mask: 255.255.255.0
|     Broadcast Address: 192.168.0.255
|     Router: 192.168.0.1
|     Domain Name Server: 192.168.0.1
|     Domain Name: lan
|_    Vendor Specific Information: 0104C0A80002

But I don't know if it will work because the hardware is not there yet.

urm just run the docker in host mode? Thats easy cheat mode.

Or do this as the linuxserver crew suggests

For Unifi to adopt other devices, e.g. an Access Point, it is required to change the inform IP address. Because Unifi runs inside Docker by default it uses an IP address not accessible by other devices. To change this go to Settings > System Settings > Controller Configuration and set the Controller Hostname/IP to a hostname or IP address accessible by your devices. Additionally the checkbox "Override inform host with controller hostname/IP" has to be checked, so that devices can connect to the controller during adoption (devices use the inform-endpoint during adoption).

Package unifi-controller (github.com)

docker-compose.yml

---
#privileged: true
version: "2.1"
services:
  unifi-controller:
    image: ghcr.io/linuxserver/unifi-controller
    container_name: unifi-controller
    network_mode: host
    # Uncomment the following to set java options
    # environment:
#       JAVA_OPTS: -Xmx512M
    environment:
      - PUID=1000
      - PGID=1000
      - MEM_LIMIT=1024M #optional
    volumes:
      - /var/lib/unifi:/config
#    ports:
#      - 3478:3478/udp
#      - 10001:10001/udp
#      - 8080:8080
#      - 8443:8443
#      - 1900:1900/udp #optional
#      - 8843:8843 #optional
#      - 8880:8880 #optional
#      - 6789:6789 #optional
#      - 5514:5514/udp #optional
    restart: unless-stopped

docker-compose pull
docker-compose up -d

@mrremo - did you end up figuring this out?