Skip to content

Can't make docker login to work from within container #188

@whoan

Description

@whoan

I don't know if this is the expected behavior, but if I run docker login from a container from docker image, it tries the following and fails:
$ docker run -ti --rm docker:dind ash

# docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: me
Password: 
error during connect: Post http://docker:2375/v1.40/auth: dial tcp: lookup docker on 8.8.8.8:53: no such host

As you can see, it tries (unsuccessfully) to connect to host docker and fails. Why? Is it expected?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions