github.com/eikeon/docker@v1.5.0-rc4/project/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 LDFLAGS_STATIC_DOCKER="-X $DOCKER_PKG/dockerversion.INITSHA1 \"$DOCKER_INITSHA1\" -X $DOCKER_PKG/dockerversion.INITPATH \"$DOCKER_INITPATH\""
    18  	export BUILDFLAGS=( "${BUILDFLAGS[@]/netgo /}" ) # disable netgo, since we don't need it for a dynamic binary
    19  	source "$(dirname "$BASH_SOURCE")/binary"
    20  )