File: runc.installer

package info (click to toggle)
docker.io 20.10.5%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 59,648 kB
  • sloc: sh: 5,527; makefile: 616; ansic: 179; python: 162; asm: 7
file content (30 lines) | stat: -rwxr-xr-x 1,073 bytes parent folder | download | duplicates (2)
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/sh

# When updating RUNC_COMMIT, also update runc in vendor.conf accordingly
# The version of runc should match the version that is used by the containerd
# version that is used. If you need to update runc, open a pull request in
# the containerd project first, and update both after that is merged.
: ${RUNC_COMMIT:=12644e614e25b05da6fd08a38ffa0cfe1903fdec} # v1.0.0-rc93

install_runc() {
	# If using RHEL7 kernels (3.10.0 el7), disable kmem accounting/limiting
	if uname -r | grep -q '^3\.10\.0.*\.el7\.'; then
		: ${RUNC_NOKMEM='nokmem'}
	fi

	# Do not build with ambient capabilities support
	RUNC_BUILDTAGS="${RUNC_BUILDTAGS:-"seccomp $RUNC_NOKMEM"}"

	echo "Install runc version $RUNC_COMMIT (build tags: $RUNC_BUILDTAGS)"
	git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc"
	cd "$GOPATH/src/github.com/opencontainers/runc"
	git checkout -q "$RUNC_COMMIT"
	if [ -z "$1" ]; then
		target=static
	else
		target="$1"
	fi
	make BUILDTAGS="$RUNC_BUILDTAGS" "$target"
	mkdir -p "${PREFIX}"
	cp runc "${PREFIX}/runc"
}