从Docker内部访问蓝牙加密狗? [英] Accessing Bluetooth dongle from inside Docker?

查看:178
本文介绍了从Docker内部访问蓝牙加密狗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Docker容器内使用蓝牙(在我的情况下为BLE)加密狗?

Is it possible to use a bluetooth (BLE in my case) dongle inside of a docker container?

在我的主机上:

$ hcitool dev
    Devices:
       hci0   5C:F3:70:64:F0:11

在Docker内部未找到任何内容.我将Docker运行为:

Inside of Docker it doesn't find anything. I'm running Docker as:

sudo docker run --privileged -i -t ubuntu /bin/bash

我对Linux的蓝牙子系统了解不足,无法了解主机和docker之间的区别.

I don't know enough about the bluetooth subsystem in Linux to understand what is different between the host and docker.

hci0 设备确实出现在两个系统中:

The hci0 device does show up in both systems:

$ ls -l /sys/class/bluetooth
lrwxrwxrwx  1 root root 0 Mar  5 01:23 hci0 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.3/2-2.3:1.0/bluetooth/hci0

有人尝试在Docker内部使用蓝牙吗?

Anyone try to use bluetooth inside of Docker?

推荐答案

尝试一下:

sudo docker run --net = host --privileged -i -t ubuntu/bin/bash

sudo docker run --net=host --privileged -i -t ubuntu /bin/bash

这篇关于从Docker内部访问蓝牙加密狗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆