-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmulti-platform-download.sh
35 lines (29 loc) · 1.29 KB
/
multi-platform-download.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
ARC=$(uname -m)
ARCH="amd64"
case "$ARC" in
x86_64)
ARCH="amd64"
;;
aarch64)
ARCH="arm64"
;;
?)
echo "error: not supported platform right now, exit"
exit 1
;;
esac
mkdir -p /extra/cni /extra/containerd
wget "https://github.com/containernetworking/plugins/releases/download/${CNI_PLUGINS_VERSION}/cni-plugins-linux-${ARCH}-${CNI_PLUGINS_VERSION}.tgz" && \
tar zxf "cni-plugins-linux-${ARCH}-${CNI_PLUGINS_VERSION}.tgz" -C /extra/cni && \
rm -rf "cni-plugins-linux-${ARCH}-${CNI_PLUGINS_VERSION}.tgz"
wget "https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRICTL_VERSION}/crictl-${CRICTL_VERSION}-linux-${ARCH}.tar.gz" && \
tar zxf "crictl-${CRICTL_VERSION}-linux-${ARCH}.tar.gz" -C /extra/containerd && \
rm -rf "crictl-${CRICTL_VERSION}-linux-${ARCH}.tar.gz"
wget "https://github.com/containerd/containerd/releases/download/v${CONTAINERD_VER}/containerd-${CONTAINERD_VER}-linux-${ARCH}.tar.gz" && \
tar zxf "containerd-${CONTAINERD_VER}-linux-${ARCH}.tar.gz" -C /tmp && \
mv /tmp/bin/* /extra/containerd && \
rm -rf "containerd-${CONTAINERD_VER}-linux-${ARCH}.tar.gz"
wget "https://github.com/opencontainers/runc/releases/download/${RUNC_VER}/runc.${ARCH}" && \
mv runc.${ARCH} /extra/containerd/runc && \
chmod +x /extra/containerd/runc