version: 2
jobs:
  build:
    working_directory: /tmp/docker-digdag

    docker:
      - image: ruby:2.4.1

    steps:
      - checkout

      - setup_remote_docker

      - run:
          name: Install Docker client
          command: |
            set -x
            VER="17.03.1-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:
          name: Check docker version
          command: |
            set -x
            docker version
            docker info

      - run:
          name: Build digdag image
          command: |
            set -x
            docker build -t minimum2scp/digdag:ci .

      - run: bundle check || bundle install --jobs=4

      - run: DOCKER_IMAGE=minimum2scp/digdag:ci bundle exec rspec spec/digdag/


version: 2
jobs:
  build:
    working_directory: /tmp/docker-digdag

    docker:
      - image: circleci/ruby:2.4.1

    steps:
      - checkout

      - setup_remote_docker

      - run:
          name: Install Docker client
          command: |
            set -x
            VER="17.03.1-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:
          name: Check docker version
          command: |
            set -x
            docker version
            docker info

      - run:
          name: Build digdag image
          command: |
            set -x
            docker build -t minimum2scp/digdag:ci .

      - run: bundle check || bundle install --jobs=4

      - run: DOCKER_IMAGE=minimum2scp/digdag:ci bundle exec rspec spec/digdag/


Use circleci/ruby:2.4.1 image for CI
Use circleci/ruby:2.4.1 image for CI
