I use a Rasperry Pi 4 with Raspberry Pi OS and docker compose. In my compose I have several containers and also several networks. I want to use the embedded Bluetooth in one of the containers. Since the corresponding container is connected to multiple networks, I can not use network_mode: host
.
I can confirm that docker run --net=host --privileged -i -t ubuntu /bin/bash
works and creates me a container by which I can also use Bluetooth (tested with hcitool lescan). But how can I do this without using network_mode: host
(or --net=host
)?