Skip to content

Can't connect to the docker daemon #200

@jeanbza

Description

@jeanbza
$ docker run -it --privileged docker:dind /bin/sh
/ # docker ps
error during connect: Get http://docker:2375/v1.40/containers/json: dial tcp: lookup docker on 192.168.65.1:53: no such host
/ #

Am I missing something? Is there no way to connect to the daemon without linking another container outside of this container?


Things I've tried:

  • dockerd &

  • dockerd-entrypoint.sh &

  • Trying to grok dockerd-entrypoint.sh and reverse-engineer

  • Trying to set DOCKER_HOST=localhost (based on Can't make docker login to work from within container #188)

    $ docker run --rm -ti --privileged -e DOCKER_HOST=localhost docker:dind sh
    / # docker ps
    Cannot connect to the Docker daemon at tcp://localhost:2375. Is the docker daemon running?
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions