runc.installer 644 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. # When updating RUNC_COMMIT, also update runc in vendor.conf accordingly
  3. RUNC_COMMIT=69663f0bd4b60df09991c08812a60108003fa340
  4. install_runc() {
  5. # Do not build with ambient capabilities support
  6. RUNC_BUILDTAGS="${RUNC_BUILDTAGS:-"seccomp apparmor selinux"}"
  7. echo "Install runc version $RUNC_COMMIT"
  8. git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc"
  9. cd "$GOPATH/src/github.com/opencontainers/runc"
  10. git checkout -q "$RUNC_COMMIT"
  11. if [ -z "$1" ]; then
  12. target=static
  13. else
  14. target="$1"
  15. fi
  16. make BUILDTAGS="$RUNC_BUILDTAGS" "$target"
  17. mkdir -p ${PREFIX}
  18. cp runc ${PREFIX}/runc
  19. }