Repository navigation
Expand file tree
/
Copy pathpkg.yaml
More file actions
54 lines (52 loc) · 2.32 KB
/
Copy pathpkg.yaml
File metadata and controls
54 lines (52 loc) · 2.32 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: gvisor
variant: scratch
shell: /bin/bash
dependencies:
- stage: base
steps:
- sources:
# {{ if eq .ARCH "aarch64" }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr
- url: https://github.com/google/gvisor/releases/download/release-{{ .GVISOR_VERSION }}/gvisor-aarch64.tar.zstd
destination: gvisor.tar.zstd
sha256: {{ .GVISOR_ARM64_SHA256 }}
sha512: {{ .GVISOR_ARM64_SHA512 }}
# {{ else }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr
- url: https://github.com/google/gvisor/releases/download/release-{{ .GVISOR_VERSION }}/gvisor-x86_64.tar.zstd
destination: gvisor.tar.zstd
sha256: {{ .GVISOR_AMD64_SHA256 }}
sha512: {{ .GVISOR_AMD64_SHA512 }}
# {{ end }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr
install:
- |
# The release tarball holds runsc, containerd-shim-runsc-v1 and the
# gvisor-bin/ sidecars in the layout runsc expects.
mkdir -p /rootfs/usr/local/bin
tar -xf gvisor.tar.zstd -C /rootfs/usr/local/bin
- |
mkdir -p /rootfs/etc/cri/conf.d
cp /pkg/10-gvisor.part /pkg/runsc.toml /pkg/10-gvisor-kvm.part /pkg/runsc-kvm.toml /rootfs/etc/cri/conf.d/
test:
- |
# The release tarball is extracted as-is, so check that the expected
# binaries are there and that runsc is the version we asked for.
for bin in runsc containerd-shim-runsc-v1 gvisor-bin/gvisor_sentry; do
test -x "/rootfs/usr/local/bin/${bin}" || { echo "missing ${bin}"; exit 1; }
done
/rootfs/usr/local/bin/runsc --version | grep -Fx "runsc version release-{{ .GVISOR_VERSION }}"
- |
mkdir -p /extensions-validator-rootfs
cp -r /rootfs/ /extensions-validator-rootfs/rootfs
cp /pkg/manifest.yaml /extensions-validator-rootfs/manifest.yaml
/extensions-validator validate --rootfs=/extensions-validator-rootfs --pkg-name="${PKG_NAME}"
sbom:
outputPath: /rootfs/usr/local/share/spdx/gvisor.spdx.json
version: {{ .GVISOR_VERSION }}
cpes:
- cpe:2.3:a:google:gvisor:{{ .GVISOR_VERSION }}:*:*:*:*:*:*:*
licenses:
- Apache-2.0
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /