Skip to content

Commit

Permalink
Provide example devcontainer config for mdns and USB passthrough (esp…
Browse files Browse the repository at this point in the history
  • Loading branch information
linkedupbits authored Feb 20, 2024
1 parent 924389b commit 4d8b5ed
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,21 @@
"PIP_BREAK_SYSTEM_PACKAGES": "1",
"PIP_ROOT_USER_ACTION": "ignore"
},
"runArgs": ["--privileged", "-e", "ESPHOME_DASHBOARD_USE_PING=1"],
"runArgs": [
"--privileged",
"-e",
"ESPHOME_DASHBOARD_USE_PING=1"
// uncomment and edit the path in order to pass though local USB serial to the conatiner
// , "--device=/dev/ttyACM0"
],
"appPort": 6052,
// if you are using avahi in the host device, uncomment these to allow the
// devcontainer to find devices via mdns
//"mounts": [
// "type=bind,source=/dev/bus/usb,target=/dev/bus/usb",
// "type=bind,source=/var/run/dbus,target=/var/run/dbus",
// "type=bind,source=/var/run/avahi-daemon/socket,target=/var/run/avahi-daemon/socket"
//],
"customizations": {
"vscode": {
"extensions": [
Expand Down
3 changes: 3 additions & 0 deletions script/devcontainer-post-create
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
set -e
# set -x

apt update
apt-get install avahi-utils -y

mkdir -p config
script/setup

Expand Down

0 comments on commit 4d8b5ed

Please sign in to comment.