#!/bin/bash # This should be run inside a container built from the Dockerfile # at the root of the repo - script/test will do it automatically. set -e >&2 echo "Running lint checks" docker run --rm \ ${GIT_VOLUME} \ --entrypoint="tox" \ "$TAG" -e pre-commit if [ "$DOCKER_VERSIONS" == "" ]; then DOCKER_VERSIONS="$DEFAULT_DOCKER_VERSION" elif [ "$DOCKER_VERSIONS" == "all" ]; then DOCKER_VERSIONS="$ALL_DOCKER_VERSIONS" fi for version in $DOCKER_VERSIONS; do >&2 echo "Running tests against Docker $version" ( set -x daemon_container_id=$(\ docker run \ -d \ --privileged \ --volume="/var/lib/docker" \ --expose="2375" \ dockerswarm/dind:$version \ docker -d -H tcp://0.0.0.0:2375 \ ) docker run \ --rm \ --link="$daemon_container_id:docker" \ --env="DOCKER_HOST=tcp://docker:2375" \ --entrypoint="tox" \ "$TAG" \ -e py27,py34 -- "$@" docker rm -vf "$daemon_container_id" ) done