From 84a02eb30af407f31ad90c55b863fdb501639106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20H=C3=BCsers?= Date: Thu, 10 Nov 2022 17:46:52 +0100 Subject: [PATCH 1/2] gvisor-bin: Add .gitignore --- gvisor-bin/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 gvisor-bin/.gitignore diff --git a/gvisor-bin/.gitignore b/gvisor-bin/.gitignore new file mode 100644 index 0000000..7461add --- /dev/null +++ b/gvisor-bin/.gitignore @@ -0,0 +1,2 @@ +/runsc +/containerd-shim-runsc-v1 From a8a34013a520cb3cb2deba046ba9a3499496df57 Mon Sep 17 00:00:00 2001 From: Manuel Date: Thu, 10 Nov 2022 17:48:08 +0100 Subject: [PATCH 2/2] Add script to check gVisor version --- check-gvisor.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 check-gvisor.sh diff --git a/check-gvisor.sh b/check-gvisor.sh new file mode 100755 index 0000000..3459876 --- /dev/null +++ b/check-gvisor.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +VERSION="$(echo $1 | jq -Rr @html)" +BINARY='runsc' +SHIM='containerd-shim-runsc-v1' +URL_BASE="https://storage.googleapis.com/gvisor/releases/release/" +URL="${URL_BASE}${VERSION}/$(uname -m)/" +URL_X64="${URL_BASE}${VERSION}/x86_64/" +URL_ARM="${URL_BASE}${VERSION}/aarch64/" + +STATUS=$(curl -s -o /dev/null -I -w "%{http_code}" "${URL}${BINARY}") +EXIT=0 + +case $STATUS in + 200) + echo "Release: ${VERSION}" + echo "" + echo "x86_64 sha512:" + echo "$(curl -s ${URL_X64}${BINARY}.sha512)" + echo "$(curl -s ${URL_X64}${SHIM}.sha512)" + echo "" + echo "aarch64 sha512:" + echo "$(curl -s ${URL_ARM}${BINARY}.sha512)" + echo "$(curl -s ${URL_ARM}${SHIM}.sha512)" + ;; + 404) + echo "Release ${VERSION} not found" + EXIT=1 + ;; + *) + echo "Error occured with status ${STATUS}" + EXIT=2 + ;; +esac + +exit $EXIT