version: 2
jobs:
  build:
    docker:
      - image: debian
    working_directory: /work
    steps:
      - run:
          name: Install Dependencies
          command: |
            set -x
            apt-get update
            apt-get install -y --no-install-recommends git-core curl ca-certificates
      - checkout
      - setup_remote_docker
      - run:
          name: Install Docker client
          command: |
            set -x
            VER="17.05.0-ce"
            curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz
            tar -xz -C /tmp -f /tmp/docker-$VER.tgz
            mv /tmp/docker/* /usr/bin
      - run: ./test.sh
