From e7cbc218b26f6131841150f5640852b9604a19ad 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 | 51 +++- plugincontainer/compatibility_test.go | 133 +++++++++ plugincontainer/config.go | 3 +- plugincontainer/container_runner.go | 14 +- .../container_runner_external_test.go | 270 ++++++++++++++++++ plugincontainer/container_runner_test.go | 255 ----------------- plugincontainer/examples/container/Dockerfile | 20 +- .../examples/container/plugin-counter/main.go | 11 + 8 files changed, 486 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..bf05e36 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 <