From 5739ae35600b378e924461dac8b85b382398db91 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Thu, 11 Feb 2021 10:45:03 +0100 Subject: [PATCH] Kata install update --- docker-install-all.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker-install-all.sh b/docker-install-all.sh index 5664dc1..23943b7 100755 --- a/docker-install-all.sh +++ b/docker-install-all.sh @@ -26,7 +26,11 @@ mem=$(sed -E 's/^MemTotal: +([0-9]+) kB/\1/p;d' < /proc/meminfo) mempercore=$(((mem/1024-4096)/cores)) # install kata containers -docker run --runtime=runc -v /opt/kata:/opt/kata -v /var/run/dbus:/var/run/dbus -v /run/systemd:/run/systemd -v /etc/docker:/etc/docker -it katadocker/kata-deploy kata-deploy-docker install +cid=$(docker run --runtime=runc -v /opt/kata:/opt/kata -v /var/run/dbus:/var/run/dbus -v /run/systemd:/run/systemd -v /etc/docker:/etc/docker -it katadocker/kata-deploy kata-deploy-docker install) +# wait for finish +while [ "$(docker container inspect -f '{{.State.Running}}' "$cid")" == "true" ]; do + sleep 1 +done # update default container CPU and memory sed -i "s/default_vcpus = .*/default_vcpus = 2/g;s/default_memory = .*/default-memory = $mempercore/g" /opt/kata/share/defaults/kata-containers/configuration-qemu-virtiofs.toml