Unable to start remote Docker engine with local build


#1

Trying to run my build locally using executorType: docker and a base image of centos:7 however I get Error: Got error while creating host: rpc error: code = 2 desc = Machine configuration is not found. Do I need to use the CircleCI base image or something?

MCVE:

version: 2
executorType: docker
containerInfo:
  - image: centos:7

stages:
  build:
    workDir: /Account
    steps:
      - type: checkout

      - type: shell
        shell: /bin/bash --login
        name: Install Docker Engine
        command: |
          curl -L -o /tmp/docker.tgz https://get.docker.com/builds/Linux/x86_64/docker-1.12.3.tgz
          tar -xz -C /tmp -f /tmp/docker.tgz
          mv /tmp/docker/docker* /usr/bin/

          curl -L "https://github.com/docker/compose/releases/download/1.9.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose
          chmod +x /usr/bin/docker-compose

          ls -alh /usr/bin/docker*

      - type: setup-docker-engine

Output:

$ circleci-builder -v $(pwd):/Account build
====>> 0. Spin up Environment
Build-agent version 0.0.2042-3f84f6d (2017-01-04T02:36:31+0000)
Starting container centos:7
  using image centos@sha256:b2f9d1c0ff5f87a4743104d099a3d561002ac500db1b9bfa02a783a46e0d366c

Using build environment variables:
  CI=true
  CIRCLECI=true
  CIRCLE_REPOSITORY_URL=git@github.com:mediaingenuity/Account.git
  CIRCLE_SHA1=5b9ae45060a01c76569a438f836e11693d1a5634
  CIRCLE_BRANCH=circle-2.0
  CIRCLE_BUILD_NUM=123
  CIRCLE_NODE_INDEX=0
  CIRCLE_NODE_TOTAL=1
  CIRCLE_JOB=build

====>> 1. Checkout code
Warning: skipping this step: running locally
====>> 2. Install Docker Engine
  curl -L -o /tmp/docker.tgz https://get.docker.com/builds/Linux/x86_64/docker-1.12.3.tgz
tar -xz -C /tmp -f /tmp/docker.tgz
mv /tmp/docker/docker* /usr/bin/

curl -L "https://github.com/docker/compose/releases/download/1.9.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose
chmod +x /usr/bin/docker-compose

ls -alh /usr/bin/docker*

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 27.5M  100 27.5M    0     0  4234k      0  0:00:06  0:00:06 --:--:-- 4454k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   600    0   600    0     0   1169      0 --:--:-- --:--:-- --:--:--  1167
100 7857k  100 7857k    0     0   632k      0  0:00:12  0:00:12 --:--:-- 1275k
-rwxr-xr-x 1 root root  15M Oct 26 23:31 /usr/bin/docker
-rwxr-xr-x 1 root root 7.7M Jan  4 16:40 /usr/bin/docker-compose
-rwxr-xr-x 1 root root  11M Oct 26 23:31 /usr/bin/docker-containerd
-rwxr-xr-x 1 root root  11M Oct 26 23:31 /usr/bin/docker-containerd-ctr
-rwxr-xr-x 1 root root 3.6M Oct 26 23:31 /usr/bin/docker-containerd-shim
-rwxr-xr-x 1 root root 2.8M Oct 26 23:31 /usr/bin/docker-proxy
-rwxr-xr-x 1 root root 8.4M Oct 26 23:31 /usr/bin/docker-runc
-rwxr-xr-x 1 root root  44M Oct 26 23:31 /usr/bin/dockerd
====>> 3. Setup a remote Docker engine
Allocating a remote  Docker Engine
Error: Got error while creating host: rpc error: code = 2 desc = Machine configuration is not found

Step failed
Task failed

#2

What is that you are tying to accomplish by installing Docker Engine on Docker? Perhaps we can help you find a way to get this to work without having to. Let us know! :slight_smile:


#3

I think he is trying to do this as decribe here: Getting Started: Docker Engine

or not?


#4

Indeed I am. Can I do things like caching Docker images across builds using the executor: machine config option? That said, I’d still really like to be able to use native Docker. I heard some noise about native Docker compose support. Is that relevent to this current issue?


#5

For the local build I dont know if you can install docker, I guess on CCI they use a remote. But I’m newbie in the CCI 2.0 :frowning:


#6

I’m confirming with others internally, but as far as I know, CCI-local doesn’t currently support the executor: machine and docker-engine. I’ll post here when I hear back.


#7

@Eric From my personal experience, I can’t get executorType: machine working locally. It results in error when spinning up environment. Any prediction of when it will be available for CircleCI local?


#8

Our engineers are actively working on it. We hope to have it out soon but no ETA as of yet. We will keep you posted though!


#9