Add devcontainer (#1040)

* Add devcontainer (generic add-on devcontainer also available at https://github.com/issacg/hassio-addon-devcontainer)

* remove example code (https://github.com/home-assistant/hassio-addons/pull/1040#discussion_r374373037)

* Run start_hassio.sh from inside .devcontainer (https://github.com/home-assistant/hassio-addons/pull/1040#discussion_r374373323)
This commit is contained in:
Issac
2020-02-04 18:15:13 +02:00
committed by GitHub
parent 3dda157691
commit fd87353f2e
4 changed files with 195 additions and 0 deletions

41
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,41 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Start Hass.io",
"type": "shell",
"command": "/workspaces/test_hassio/addons/local/.devcontainer/start_hassio.sh",
"group": {
"kind": "test",
"isDefault": true,
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},{
"label": "Cleanup stale Hass.io environment",
"type": "shell",
"command": "/workspaces/test_hassio/addons/local/.devcontainer/start_hassio.sh --cleanup",
"group": "test",
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},{
"label": "Run Hass.io CLI",
"type": "shell",
"command": "docker run --rm -ti -v /etc/machine-id:/etc/machine-id --network=hassio --add-host hassio:172.30.32.2 homeassistant/amd64-hassio-cli:dev",
"group": "test",
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
}
]
}