moby/hack/dockerfile/install/runc.installer
Akihiro Suda c55eb6b824
update runc binary to v1.1.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-02-06 16:23:38 +09:00

29 lines
946 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.mod accordingly
: "${RUNC_VERSION:=v1.1.0}"
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"
}