mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
3e5eea4192
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 53397ac539
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
29 lines
947 B
Bash
Executable file
29 lines
947 B
Bash
Executable file
#!/bin/sh
|
|
set -e
|
|
|
|
# RUNC_VERSION specifies the version of runc to install from the
|
|
# https://github.com/opencontainers/runc repository.
|
|
#
|
|
# 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.
|
|
#
|
|
# When updating RUNC_VERSION, consider updating runc in vendor.conf accordingly
|
|
: "${RUNC_VERSION:=v1.0.3}"
|
|
|
|
install_runc() {
|
|
RUNC_BUILDTAGS="${RUNC_BUILDTAGS:-"seccomp"}"
|
|
|
|
echo "Install runc version $RUNC_VERSION (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_VERSION"
|
|
if [ -z "$1" ]; then
|
|
target=static
|
|
else
|
|
target="$1"
|
|
fi
|
|
make BUILDTAGS="$RUNC_BUILDTAGS" "$target"
|
|
mkdir -p "${PREFIX}"
|
|
cp runc "${PREFIX}/runc"
|
|
}
|