github.com/wmydz1/docker@v1.6.2/hack/make/dynbinary (about)

     1  #!/bin/bash
     2  set -e
     3  
     4  DEST=$1
     5  
     6  if [ -z "$DOCKER_CLIENTONLY" ]; then
     7  	source "$(dirname "$BASH_SOURCE")/.dockerinit"
     8  	
     9  	hash_files "$DEST/dockerinit-$VERSION"
    10  else
    11  	# DOCKER_CLIENTONLY must be truthy, so we don't need to bother with dockerinit :)
    12  	export DOCKER_INITSHA1=""
    13  fi
    14  # DOCKER_INITSHA1 is exported so that other bundlescripts can easily access it later without recalculating it
    15  
    16  (
    17  	export IAMSTATIC="false"
    18  	export LDFLAGS_STATIC_DOCKER=''
    19  	export BUILDFLAGS=( "${BUILDFLAGS[@]/netgo /}" ) # disable netgo, since we don't need it for a dynamic binary
    20  	export BUILDFLAGS=( "${BUILDFLAGS[@]/static_build /}" ) # we're not building a "static" binary here
    21  	source "$(dirname "$BASH_SOURCE")/binary"
    22  )