mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add containerd static compile
Fixes #35349 Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
147ec3be2e
commit
007db062f0
1 changed files with 16 additions and 2 deletions
|
@ -34,7 +34,21 @@ install_containerd() {
|
||||||
git checkout -q "$CONTAINERD_COMMIT"
|
git checkout -q "$CONTAINERD_COMMIT"
|
||||||
(
|
(
|
||||||
export GOPATH
|
export GOPATH
|
||||||
make $1
|
make
|
||||||
|
)
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
install_containerd_static() {
|
||||||
|
echo "Install containerd version $CONTAINERD_COMMIT"
|
||||||
|
git clone https://github.com/containerd/containerd.git "$GOPATH/src/github.com/containerd/containerd"
|
||||||
|
cd "$GOPATH/src/github.com/containerd/containerd"
|
||||||
|
git checkout -q "$CONTAINERD_COMMIT"
|
||||||
|
(
|
||||||
|
export GOPATH
|
||||||
|
make EXTRA_FLAGS="-buildmode pie" EXTRA_LDFLAGS="-extldflags \\\"-fno-PIC -static\\\""
|
||||||
)
|
)
|
||||||
cp bin/containerd /usr/local/bin/docker-containerd
|
cp bin/containerd /usr/local/bin/docker-containerd
|
||||||
cp bin/containerd-shim /usr/local/bin/docker-containerd-shim
|
cp bin/containerd-shim /usr/local/bin/docker-containerd-shim
|
||||||
|
@ -106,7 +120,7 @@ do
|
||||||
;;
|
;;
|
||||||
|
|
||||||
containerd)
|
containerd)
|
||||||
install_containerd
|
install_containerd_static
|
||||||
;;
|
;;
|
||||||
|
|
||||||
containerd-dynamic)
|
containerd-dynamic)
|
||||||
|
|
Loading…
Reference in a new issue