summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..79c848e
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+set -o errexit
+
+case "$(go env GOARCH)" in
+ "arm")
+ arch="armv$(go env GOARM)"
+ ;;
+ "arm64")
+ arch="aarch64"
+ ;;
+ "386")
+ arch="i386"
+ ;;
+ "amd64")
+ arch="x86_64"
+ ;;
+esac
+
+version=$(git describe --tags --always)
+
+AUTO_GOPATH=1 \
+DOCKER_BUILDTAGS='exclude_graphdriver_btrfs exclude_graphdriver_devicemapper' \
+./hack/make.sh binary-docker
+
+src="bundles/latest/binary-docker"
+dst="docker"
+
+rm -rf "$dst"
+mkdir "$dst"
+
+cp -L "$src/docker" "$dst/docker"
+strip "$dst/docker"
+
+ln -s docker "$dst/dockerd"
+ln -s docker "$dst/docker-containerd"
+ln -s docker "$dst/docker-containerd-ctr"
+ln -s docker "$dst/docker-containerd-shim"
+ln -s docker "$dst/docker-proxy"
+ln -s docker "$dst/docker-runc"
+
+tar czfv "docker-$version-$arch.tar.gz" "$dst"