runc.installer 947 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. set -e
  3. # RUNC_VERSION specifies the version of runc to install from the
  4. # https://github.com/opencontainers/runc repository.
  5. #
  6. # The version of runc should match the version that is used by the containerd
  7. # version that is used. If you need to update runc, open a pull request in
  8. # the containerd project first, and update both after that is merged.
  9. #
  10. # When updating RUNC_VERSION, consider updating runc in vendor.mod accordingly
  11. : "${RUNC_VERSION:=v1.1.12}"
  12. install_runc() {
  13. RUNC_BUILDTAGS="${RUNC_BUILDTAGS:-"seccomp"}"
  14. echo "Install runc version $RUNC_VERSION (build tags: $RUNC_BUILDTAGS)"
  15. git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc"
  16. cd "$GOPATH/src/github.com/opencontainers/runc"
  17. git checkout -q "$RUNC_VERSION"
  18. if [ -z "$1" ]; then
  19. target=static
  20. else
  21. target="$1"
  22. fi
  23. make BUILDTAGS="$RUNC_BUILDTAGS" "$target"
  24. mkdir -p "${PREFIX}"
  25. cp runc "${PREFIX}/runc"
  26. }