From 06230778d2b020099abc7b061f2af286a65b7b69 Mon Sep 17 00:00:00 2001 From: Tom Proctor Date: Thu, 21 Sep 2023 14:05:27 +0100 Subject: [PATCH] plugincontainer: Support mlock --- .github/workflows/go.yml | 50 +++- plugincontainer/compatibility_test.go | 141 ++++++++++ plugincontainer/config.go | 3 +- plugincontainer/container_runner.go | 14 +- .../container_runner_external_test.go | 266 ++++++++++++++++++ plugincontainer/container_runner_test.go | 255 ----------------- plugincontainer/examples/container/Dockerfile | 20 +- .../examples/container/plugin-counter/main.go | 11 + 8 files changed, 489 insertions(+), 271 deletions(-) create mode 100644 plugincontainer/compatibility_test.go create mode 100644 plugincontainer/container_runner_external_test.go diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index b7e30f3..143b0bc 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -42,24 +42,23 @@ jobs: run: | ( set -e - ARCH=$(uname -m) - URL=https://storage.googleapis.com/gvisor/releases/release/latest/${ARCH} - wget --quiet ${URL}/runsc ${URL}/runsc.sha512 \ - ${URL}/containerd-shim-runsc-v1 ${URL}/containerd-shim-runsc-v1.sha512 + ARCH="$(uname -m)" + URL="https://storage.googleapis.com/gvisor/releases/release/latest/${ARCH}" + wget --quiet "${URL}/runsc" "${URL}/runsc.sha512" \ + "${URL}/containerd-shim-runsc-v1" "${URL}/containerd-shim-runsc-v1.sha512" sha512sum -c runsc.sha512 \ -c containerd-shim-runsc-v1.sha512 - rm -f *.sha512 + rm -f -- *.sha512 chmod a+rx runsc containerd-shim-runsc-v1 sudo mv runsc containerd-shim-runsc-v1 /usr/local/bin ) - cat | sudo tee /etc/docker/daemon.json <