1
0
mirror of https://github.com/docker/cli.git synced 2026-01-13 18:22:35 +03:00
Files
cli/components/engine/hack/make/cross
Guillaume J. Charmes 2ebfedab6d Add buildflags to allow crosscompilation for apparmor
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
Upstream-commit: c89fa6645ef87e1863ef5812bd42176f5bd987ca
Component: engine
2014-03-06 12:05:03 -08:00

25 lines
676 B
Bash

#!/bin/bash
DEST=$1
# if we have our linux/amd64 version compiled, let's symlink it in
if [ -x "$DEST/../binary/docker-$VERSION" ]; then
mkdir -p "$DEST/linux/amd64"
(
cd "$DEST/linux/amd64"
ln -s ../../../binary/* ./
)
echo "Created symlinks:" "$DEST/linux/amd64/"*
fi
for platform in $DOCKER_CROSSPLATFORMS; do
(
mkdir -p "$DEST/$platform" # bundles/VERSION/cross/GOOS/GOARCH/docker-VERSION
export GOOS=${platform%/*}
export GOARCH=${platform##*/}
export LDFLAGS_STATIC="" # we just need a simple client for these platforms (TODO this might change someday)
export BUILDTAGS="netgo"
source "$(dirname "$BASH_SOURCE")/binary" "$DEST/$platform"
)
done