i currently looking for running nmcli in a docker container
nmcli work great on my host but if i'm starting a privileged container nmcli does not work.
to start my container
sudo docker run --privileged --net host -it image_with_network-manager /bin/bash
and then running nmcli
nmcli dev wifi => Error: Could not create NMClient object: Could not connect: No such file or directory
ifconfig inside my container is ok , i have eth0 and wlan0 of the host
The thing about networkmanager is that it runs on dbus. I did the same thing (stracing and seeing what was needed)
Try mounting
/var/run/dbus
as a volume.sudo docker run --privileged --net host -it --volume /var/run/dbus image_with_network-manager /bin/bash