github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/hack/dockerfile/install/runc.installer (about) 1 #!/bin/sh 2 3 # When updating RUNC_COMMIT, also update runc in vendor.conf accordingly 4 # The version of runc should match the version that is used by the containerd 5 # version that is used. If you need to update runc, open a pull request in 6 # the containerd project first, and update both after that is merged. 7 : ${RUNC_COMMIT:=dc9208a3303feef5b3839f4323d9beb36df0a9dd} # v1.0.0-rc10 8 9 install_runc() { 10 # If using RHEL7 kernels (3.10.0 el7), disable kmem accounting/limiting 11 if uname -r | grep -q '^3\.10\.0.*\.el7\.'; then 12 : ${RUNC_NOKMEM='nokmem'} 13 fi 14 15 # Do not build with ambient capabilities support 16 RUNC_BUILDTAGS="${RUNC_BUILDTAGS:-"seccomp apparmor selinux $RUNC_NOKMEM"}" 17 18 echo "Install runc version $RUNC_COMMIT (build tags: $RUNC_BUILDTAGS)" 19 git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" 20 cd "$GOPATH/src/github.com/opencontainers/runc" 21 git checkout -q "$RUNC_COMMIT" 22 if [ -z "$1" ]; then 23 target=static 24 else 25 target="$1" 26 fi 27 make BUILDTAGS="$RUNC_BUILDTAGS" "$target" 28 mkdir -p "${PREFIX}" 29 cp runc "${PREFIX}/runc" 30 }