Setting up Docker in Docker with custom build container

Editing this for clarity, since I was able to figure out where the issue is (at least part of it). Part of it coming from still learning CircleCI. However the issue still remains, just cleaning up the post.

I am working on building a job that is just building a docker image and pushing it to ECR. However I am trying to use our own build container instead of the one referenced in the CircleCI documentation.
We would like to have a single container that works both in CI and locally, so tooling stays consistent.

Right now I am testing this all through the CircleCI CLI.

Before switching to using our own container though, I attempted to use the one referenced in the documentation and I had no issues.
If I use
image: docker:18.06.1-ce-git
This works without much trouble.

However when I attempt to use our own container, the issues start.

My issue comes from needing to run this, which just fails without an actual error. I can’t find anything about how to diagnose this step.
- setup_remote_docker
When I ran that I would get:

    ====>> Setup a remote Docker engine
    Error: Error preparing docker locally.
    Found:

    Step failed
    Error: runner failed
    {"Runner":true,"level":"error","msg":"runner failed","task-id":"localbuild-1544452002","time":"2018-12-10T14:26:47Z"}
    Task failed

Here is my old post. However I don’t think this is currently relevant since it is not currently getting to these steps:

But I am struggling with figuring out what I need to add to my container to get it to work correctly.

- run:
          name: Test Docker
          command: |
              echo $DOCKER_HOST
              export DOCKER_HOST='tcp://docker:2375'
              echo $DOCKER_HOST
              dockerd --version
              docker --version
              docker ps

When this runs I get:

tcp://docker:2375
Docker version 17.12.1-ce, build 7390fc6
Docker version 17.12.1-ce, build 7390fc6
error during connect: Get http://docker:2375/v1.35/containers/json: dial tcp: lookup docker on 127.0.0.11:53: no such host

This is a private repo so I can’t post a link to the repo. But I tried looking at https://github.com/docker-library/docker/tree/595ad0c92090937dcb7c200900fb97e36d36c412/18.06 and figuring out what I need to add, but so far nothing there has helped.

Not sure what other information would help, but I am hoping there is something obvious I am missing here.

Thanks,
Jon

Hello @jonheckman,

It looks like this may be something we need to investigate on our end. Would you mind creating a support ticket for this issue?

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