install:
  - docker --version
  - docker-compose --version

script:
  - docker run -d --name=mongo mongo:3.6 && sleep 3
  - export MONGO_TEST=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mongo)
  - echo "running mongo on $MONGO_TEST"
  - docker build
      --build-arg COVERALLS_TOKEN=$COVERALLS_TOKEN
      --build-arg CI=$CI
      --build-arg TRAVIS=$TRAVIS
      --build-arg TRAVIS_BRANCH=$TRAVIS_BRANCH
      --build-arg TRAVIS_COMMIT=$TRAVIS_COMMIT
      --build-arg TRAVIS_JOB_ID=$TRAVIS_JOB_ID
      --build-arg TRAVIS_JOB_NUMBER=$TRAVIS_JOB_NUMBER
      --build-arg TRAVIS_OS_NAME=$TRAVIS_OS_NAME
      --build-arg TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST
      --build-arg TRAVIS_PULL_REQUEST_SHA=$TRAVIS_PULL_REQUEST_SHA
      --build-arg TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG
      --build-arg TRAVIS_TAG=$TRAVIS_TAG
      --build-arg MONGO_TEST=$MONGO_TEST
      .
  - docker rm -f mongo
  