1
0
Fork 0
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:
Michael Crosby 2017-10-31 11:50:29 -04:00
parent 147ec3be2e
commit 007db062f0

View file

@ -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)