github.com/dlintw/docker@v1.5.0-rc4/project/make/.integration-daemon-start (about)

     1  #!/bin/bash
     2  
     3  # see test-integration-cli for example usage of this script
     4  
     5  export PATH="$DEST/../binary:$DEST/../dynbinary:$PATH"
     6  
     7  if ! command -v docker &> /dev/null; then
     8  	echo >&2 'error: binary or dynbinary must be run before .integration-daemon-start'
     9  	false
    10  fi
    11  
    12  # intentionally open a couple bogus file descriptors to help test that they get scrubbed in containers
    13  exec 41>&1 42>&2
    14  
    15  DOCKER_GRAPHDRIVER=${DOCKER_GRAPHDRIVER:-vfs}
    16  DOCKER_EXECDRIVER=${DOCKER_EXECDRIVER:-native}
    17  
    18  if [ -z "$DOCKER_TEST_HOST" ]; then
    19  	( set -x; exec \
    20  		docker --daemon --debug \
    21  		--storage-driver "$DOCKER_GRAPHDRIVER" \
    22  		--exec-driver "$DOCKER_EXECDRIVER" \
    23  		--pidfile "$DEST/docker.pid" \
    24  			&> "$DEST/docker.log"
    25  	) &
    26  else
    27  	export DOCKER_HOST="$DOCKER_TEST_HOST"
    28  fi