Provide example devcontainer config for mdns and USB passthrough (#6094)

This commit is contained in:
Stephen Cox 2024-02-21 10:49:59 +13:00 committed by GitHub
parent 924389ba74
commit 4d8b5edb1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 1 deletions

View file

@ -7,8 +7,21 @@
"PIP_BREAK_SYSTEM_PACKAGES": "1", "PIP_BREAK_SYSTEM_PACKAGES": "1",
"PIP_ROOT_USER_ACTION": "ignore" "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, "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": { "customizations": {
"vscode": { "vscode": {
"extensions": [ "extensions": [

View file

@ -3,6 +3,9 @@
set -e set -e
# set -x # set -x
apt update
apt-get install avahi-utils -y
mkdir -p config mkdir -p config
script/setup script/setup