Is it possible to use a bluetooth (BLE in my case) dongle inside of a docker container?
On my host machine:
$ hcitool dev
Devices:
hci0 5C:F
I can confirm that what OlivierM wrote is working on me. Spent some time on Raspberry Pi 3B+ and its built-in bluetooth.
Dockerfile:
FROM python:3.7
RUN apt-get update
RUN apt-get install -y bluez bluetooth
ENTRYPOINT sh docker_entrypoint.sh
and entrypoint:
#!/bin/bash
service dbus start
bluetoothd &
/bin/bash
sudo killall -9 bluetoothd
is needed on host machine before before starting the container:
docker run --rm --net=host --privileged -it myimage:mytag