@@ -9,6 +9,28 @@ GRIMES_COMMIT=15ecf9414859b16a8a19ac6748a622a5498d57e3
99
1010export GOPATH=" $( mktemp -d) "
1111
12+ RUNC_BUILDTAGS=" ${RUNC_BUILDTAGS:- " seccomp apparmor selinux" } "
13+
14+ install_runc () {
15+ echo " Install runc version $RUNC_COMMIT "
16+ git clone https://github.com/opencontainers/runc.git " $GOPATH /src/github.com/opencontainers/runc"
17+ cd " $GOPATH /src/github.com/opencontainers/runc"
18+ git checkout -q " $RUNC_COMMIT "
19+ make BUILDTAGS=" $RUNC_BUILDTAGS " $1
20+ cp runc /usr/local/bin/docker-runc
21+ }
22+
23+ install_containerd () {
24+ echo " Install containerd version $CONTAINERD_COMMIT "
25+ git clone https://github.com/docker/containerd.git " $GOPATH /src/github.com/docker/containerd"
26+ cd " $GOPATH /src/github.com/docker/containerd"
27+ git checkout -q " $CONTAINERD_COMMIT "
28+ make $1
29+ cp bin/containerd /usr/local/bin/docker-containerd
30+ cp bin/containerd-shim /usr/local/bin/docker-containerd-shim
31+ cp bin/ctr /usr/local/bin/docker-containerd-ctr
32+ }
33+
1234for prog in " $@ "
1335do
1436 case $prog in
2042 ;;
2143
2244 runc)
23- echo " Install runc version $RUNC_COMMIT "
24- git clone https://github.com/opencontainers/runc.git " $GOPATH /src/github.com/opencontainers/runc"
25- cd " $GOPATH /src/github.com/opencontainers/runc"
26- git checkout -q " $RUNC_COMMIT "
27- make static BUILDTAGS=" seccomp apparmor selinux"
28- cp runc /usr/local/bin/docker-runc
45+ install_runc static
46+ ;;
47+
48+ runc-dynamic)
49+ install_runc
2950 ;;
3051
3152 containerd)
32- echo " Install containerd version $CONTAINERD_COMMIT "
33- git clone https://github.com/docker/containerd.git " $GOPATH /src/github.com/docker/containerd"
34- cd " $GOPATH /src/github.com/docker/containerd"
35- git checkout -q " $CONTAINERD_COMMIT "
36- make static
37- cp bin/containerd /usr/local/bin/docker-containerd
38- cp bin/containerd-shim /usr/local/bin/docker-containerd-shim
39- cp bin/ctr /usr/local/bin/docker-containerd-ctr
53+ install_containerd static
54+ ;;
55+
56+ containerd-dynamic)
57+ install_containerd
4058 ;;
4159
4260 grimes)
0 commit comments