summaryrefslogtreecommitdiffhomepage
path: root/test/e2e/runtime-handler/usage.sh
blob: 1f8a097570c24e4dd1dfea97f4636473e2889bd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

# A sample script for testing the gvisor-containerd-shim # using untrusted
# workload extension.

set -ex

{ # Step 1: Pull the nginx image
sudo crictl pull nginx
}

{ # Step 2: Create sandbox.json
cat <<EOF | tee sandbox.json
{
    "metadata": {
        "name": "nginx-sandbox",
        "namespace": "default",
        "attempt": 1,
        "uid": "hdishd83djaidwnduwk28bcsb"
    },
    "linux": {
    },
    "log_directory": "/tmp"
}
EOF
}

{ # Step 3: Create the sandbox
SANDBOX_ID=$(sudo crictl runp --runtime runsc sandbox.json)
}