How to install command of docker using setup_remote_docker


#1

Using docker with setup_remote_docker will not find command of docker
my circle.yml is as follows.

  base_docker_build_push:
    docker:
      - image: buildpack-deps:xenial

    working_directory: /src
    steps:
      - setup_remote_docker:
          version: 17.03.0-ce
          docker_layer_caching: true
      - run:
          name: Print Runtime Info
          command: |
            docker --version

Currently installing docker manually as following workaround.

base_docker_build_push:
    docker:
      - image: buildpack-deps:xenial

    working_directory: /src
    steps:
      - setup_remote_docker:        
      - run:
          name: Install Docker client
          command: |
            set -x
            VER="17.03.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:
          name: Print Runtime Info
          command: |
            docker --version

Are you installing docker using setup_remote_docker? Is there anything I misunderstood?


#2

setup_remote_docker does not install the Docker CLI/Docker client into your build. Installing it manually yourself (or using an image that already has it) is the correct way.

In your second config example though, the colon after setup_remote_docker needs to be removed.


#3

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.