2018-02-16 13:51:30 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# When updating RUNC_COMMIT, also update runc in vendor.conf accordingly
|
2018-11-01 19:07:06 -04:00
|
|
|
RUNC_COMMIT=9f1e94488e5e478e084fef997f022565b64b01d9
|
2018-02-16 13:51:30 -05:00
|
|
|
|
|
|
|
install_runc() {
|
|
|
|
# Do not build with ambient capabilities support
|
|
|
|
RUNC_BUILDTAGS="${RUNC_BUILDTAGS:-"seccomp apparmor selinux"}"
|
|
|
|
|
|
|
|
echo "Install runc version $RUNC_COMMIT"
|
|
|
|
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"
|
2018-03-07 16:29:10 -05:00
|
|
|
if [ -z "$1" ]; then
|
|
|
|
target=static
|
|
|
|
else
|
|
|
|
target="$1"
|
|
|
|
fi
|
|
|
|
make BUILDTAGS="$RUNC_BUILDTAGS" "$target"
|
2018-02-16 13:51:30 -05:00
|
|
|
mkdir -p ${PREFIX}
|
2018-09-21 18:58:34 -04:00
|
|
|
cp runc ${PREFIX}/runc
|
2018-02-16 13:51:30 -05:00
|
|
|
}
|