Add docker developer flow

Integrate flags better with the development flow a Docker developer.
Add a shell function to make invocation of tests easy.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
Derek McGowan 2015-06-03 10:18:02 -07:00
parent a438494b49
commit 19ec4e2c7a
2 changed files with 54 additions and 4 deletions

View file

@ -11,6 +11,11 @@ if [ "$DOCKER_VOLUME" != "" ]; then
volumeMount="-v ${DOCKER_VOLUME}:/var/lib/docker"
fi
dockerMount=""
if [ "$DOCKER_BINARY" != "" ]; then
dockerMount="-v ${DOCKER_BINARY}:/usr/local/bin/docker"
fi
# Image containing the integration tests environment.
INTEGRATION_IMAGE=${INTEGRATION_IMAGE:-distribution/docker-integration}
@ -18,10 +23,9 @@ INTEGRATION_IMAGE=${INTEGRATION_IMAGE:-distribution/docker-integration}
docker pull $INTEGRATION_IMAGE
# Start the integration tests in a Docker container.
ID=$(docker run -d -t --privileged $volumeMount \
ID=$(docker run -d -t --privileged $volumeMount $dockerMount \
-v ${DISTRIBUTION_ROOT}:/go/src/github.com/docker/distribution \
-e "DOCKER_VERSION=$DOCKER_VERSION" \
-e "STORAGE_DRIVER=$STORAGE_DRIVER" \
-e "STORAGE_DRIVER=$DOCKER_GRAPHDRIVER" \
-e "EXEC_DRIVER=$EXEC_DRIVER" \
${INTEGRATION_IMAGE} \
./test_runner.sh "$@")