1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2026-05-08 17:08:36 +01:00

Fix WSL2 issues + cleanup scripts (#2846)

This commit is contained in:
Pascal Vizeli
2021-04-28 14:09:37 +02:00
committed by GitHub
parent cda66ba737
commit f785c4e909
4 changed files with 18 additions and 44 deletions
+2
View File
@@ -41,6 +41,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
docker-ce \
docker-ce-cli \
containerd.io \
&& update-alternatives --set iptables /usr/sbin/iptables-legacy \
&& update-alternatives --set ip6tables /usr/sbin/iptables-legacy \
&& rm -rf /var/lib/apt/lists/*
# Install tools
+1 -15
View File
@@ -4,7 +4,7 @@
{
"label": "Run Supervisor",
"type": "shell",
"command": "./scripts/run-supervisor.sh",
"command": "./scripts/supervisor.sh",
"group": {
"kind": "test",
"isDefault": true
@@ -15,20 +15,6 @@
},
"problemMatcher": []
},
{
"label": "Build Supervisor",
"type": "shell",
"command": "./scripts/build-supervisor.sh",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Run Supervisor CLI",
"type": "shell",
-28
View File
@@ -1,28 +0,0 @@
#!/bin/bash
source "${BASH_SOURCE[0]%/*}/common.sh"
set -eE
DOCKER_TIMEOUT=30
DOCKER_PID=0
function build_supervisor() {
docker pull homeassistant/amd64-builder:dev
docker run --rm \
--privileged \
-v /run/docker.sock:/run/docker.sock \
-v "$(pwd):/data" \
homeassistant/amd64-builder:dev \
--generic latest \
--target /data \
--test \
--amd64 \
--no-cache
}
echo "Build Supervisor"
start_docker
trap "stop_docker" ERR
build_supervisor
@@ -1,12 +1,26 @@
#!/bin/bash
source "${BASH_SOURCE[0]%/*}/common.sh"
source "${BASH_SOURCE[0]%/*}/build-supervisor.sh"
set -eE
DOCKER_TIMEOUT=30
DOCKER_PID=0
function build_supervisor() {
docker pull homeassistant/amd64-builder:dev
docker run --rm \
--privileged \
-v /run/docker.sock:/run/docker.sock \
-v "$(pwd):/data" \
homeassistant/amd64-builder:dev \
--generic latest \
--target /data \
--test \
--amd64 \
--no-cache
}
function cleanup_docker() {
echo "Cleaning up stopped containers..."