Skip to content

Commit

Permalink
support BT in container
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronen Gruengras committed Apr 29, 2023
1 parent 6fb308a commit 9ea9f8e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM mcr.microsoft.com/vscode/devcontainers/python:0-3.10-bullseye
RUN apt update && apt install -y bluetooth
RUN setcap 'cap_net_raw,cap_net_admin+eip' `which hcitool`
25 changes: 21 additions & 4 deletions .devcontainer.json → .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"name": "ludeeus/hass_nuki_bt",
"image": "mcr.microsoft.com/vscode/devcontainers/python:0-3.10-bullseye",
"name": "hass_nuki_bt",
"build": {
"dockerfile": "Dockerfile"
}
"postCreateCommand": "scripts/setup",
"forwardPorts": [
8123
// "forwardPorts": [
// 8123
// ],
"appPort": [
"8123:8123"
],
"customizations": {
"vscode": {
Expand All @@ -30,6 +35,18 @@
}
},
"remoteUser": "vscode",
"capAdd": [
"NET_ADMIN"
],
"securityOpt": [
"seccomp=unconfined",
"apparmor=unconfined"
],
"runArgs": [
"-v",
"/var/run/dbus/:/var/run/dbus/:ro",
"--network=host"
],
"features": {
"rust": "latest"
}
Expand Down

0 comments on commit 9ea9f8e

Please sign in to comment.