github.com/amylindburg/docker@v1.7.0/hack/make/dynbinary (about)

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