From 1c8eb08e1e95a70768909ba26d59ede13de4a8de Mon Sep 17 00:00:00 2001 From: Ben Firshman Date: Wed, 25 Feb 2015 18:14:38 +0000 Subject: [PATCH] Remove binaries in build after building image This will bail before deleting the binaries if it can't connect to a Docker host. Sometimes I build machine binaries when I haven't got a machine and then it removes the machine binaries and then I can't use machine to create a machine and then the universe implodes. :( Signed-off-by: Ben Firshman --- script/build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/build b/script/build index 3718840bc6..3b16d12b2c 100755 --- a/script/build +++ b/script/build @@ -13,6 +13,6 @@ else OS_ARCH_ARG=($2) fi -rm -f docker-machine* docker build -t docker-machine . +rm -f docker-machine* exec docker run --rm -v `pwd`:/go/src/github.com/docker/machine docker-machine gox "${OS_PLATFORM_ARG[@]}" "${OS_ARCH_ARG[@]}" -output="docker-machine_{{.OS}}-{{.Arch}}"