moby--moby/hack/dockerfile/install-binaries.sh

59 lines
1.7 KiB
Bash
Executable File

#!/bin/sh
set -e
set -x
TOMLV_COMMIT=9baf8a8a9f2ed20a8e54160840c492f937eeaf9a
RUNC_COMMIT=02f8fa7863dd3f82909a73e2061897828460d52f
CONTAINERD_COMMIT=837e8c5e1cad013ed57f5c2090c8591c10cbbdae
GRIMES_COMMIT=f207601a8d19a534cc90d9e26e037e9931ccb9db
export GOPATH="$(mktemp -d)"
for prog in "$@"
do
case $prog in
tomlv)
echo "Install tomlv version $TOMLV_COMMIT"
git clone https://github.com/BurntSushi/toml.git "$GOPATH/src/github.com/BurntSushi/toml"
cd "$GOPATH/src/github.com/BurntSushi/toml" && git checkout -q "$TOMLV_COMMIT"
go build -v -o /usr/local/bin/tomlv github.com/BurntSushi/toml/cmd/tomlv
;;
runc)
echo "Install runc version $RUNC_COMMIT"
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_COMMIT"
make static BUILDTAGS="seccomp apparmor selinux"
cp runc /usr/local/bin/docker-runc
;;
containerd)
echo "Install containerd version $CONTAINERD_COMMIT"
git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd"
cd "$GOPATH/src/github.com/docker/containerd"
git checkout -q "$CONTAINERD_COMMIT"
make static
cp bin/containerd /usr/local/bin/docker-containerd
cp bin/containerd-shim /usr/local/bin/docker-containerd-shim
cp bin/ctr /usr/local/bin/docker-containerd-ctr
;;
grimes)
echo "Install grimes version $GRIMES_COMMIT"
git clone https://github.com/crosbymichael/grimes.git "$GOPATH/grimes"
cd "$GOPATH/grimes"
git checkout -q "$GRIMES_COMMIT"
make
cp init /usr/local/bin/docker-init
;;
*)
echo echo "Usage: $0 [tomlv|runc|containerd|grimes]"
exit 1
esac
done
rm -rf "$GOPATH"