How do I add D-Bus to Docker Container?

I'm using home assistant in a docker container on my Asusator NAS. I've been able to figure out a few things but I've tried everything I can find online to get this working with no success so I'm hoping someone here might be willing/able to help.

I've plugged in the external bluetooth device that I purchased from the list of verified bluetooth dongles. I was able to integrate it but it displays the error "DBus service not found; docker config may be missing `-v /run/dbus:/run/dbus:ro" I believe figured out that on my system the correct command seems to be var/run/dbus but other than that I can't figure out how to actually get this added. I'm using Portainer and I've tried using that command in the Exec Console, I've already tried adding it as a volume, as a runtime resource. I can't seem to edit my container in Docker compose directly but it could be that I just don't know how.

Honestly I'm way out of my depth but I have some Phillips lights that I can only control via bluetooth and would really like to add them to HA.

Thanks to anyone who responds

Look here for a bluetooth proxy device and use that instead.

Add it as a Volume in the Yaml file.

I've tried this without success. I think maybe it has to do with being in a docker container but I don't know. I'm not even sure how to find out if my docker container can access dbus.

It seems like it should be such a simple thing to add a ubiquitous technology.

I tried this once upon a time and I think the proxy couldn't find the bluetooth or something. I suppose that I can give it another shot as I've been able to come farther this time around than my last try. I really shouldn't have to resort to this though right? Bluetooth is pretty basic tech these days.

volume like this (as mentioned before here by Per)
- /var/run/dbus:/run/dbus
please make sure:

  • on the host the bt driver is loaded and lsusb shows the device
  • you bt device is not one of the shitty ones , use this list: Bluetooth - Home Assistant

I figured it out finally. I'm just posting this here on the off chance someone has the same problem as myself. In Portainer you can click on Duplicate/Edit from there you can edit volumes. What really threw me off there was that I didn't understand what to do.

You need to change it to a bind and then the host would be in my case var/run/dbus and the container needs to be run/dbus

as fellow portainer user i would advice to start using Stacks. This way you can edit in yaml your setup and all docker users understand what you're dealing with. Also versioning of your config is stored for you in that matter.