Support building a dynbinary

Cleanup dynbinary and binary builds

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin
2017-05-11 18:52:17 -04:00
parent c0cbb6580a
commit a787cbc93b
10 changed files with 101 additions and 25 deletions

View File

@ -1,5 +1,13 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
#
# Build a static binary for the host OS/ARCH
#
source ./scripts/build/ldflags
set -eu -o pipefail
go build -o ./build/docker --ldflags "${LDFLAGS}" github.com/docker/cli/cmd/docker
source ./scripts/build/.variables
export CGO_ENABLED=0
go build -o "${TARGET}" --ldflags "${LDFLAGS}" "${SOURCE}"
ln -sf "$(basename ${TARGET})" build/docker