Skip to content

docker:dind tries to listen to two overlapping ports #175

@nickygerritsen

Description

@nickygerritsen

It seems that since 7db7ecc the docker:dind container listens on $DOCKER_HOST instead of unix:///var/run/docker.sock besides listening on 0.0.0.0 port 2375 or 2376.
However, for GitLab CI to work (in Kubernetes) we have to set the environment variable DOCKER_HOST to tcp://localhost:2375. This results in docker:dind trying to bind to 2375 twice (if DOCKER_TLS_CERTDIR="" which is needed for now to get stuff working until Gitlab offers an option to share the certdir), which gives a bind: address already in use error.

For now I have fixed this by setting DOCKER_HOST to tcp://localhost:2378, letting Docker use a port that is not in use yet, but it seems to me that this is not an ideal solution.

Note that it not only broke for docker:dind but also for other versions like docker:18-dind.

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