Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All service names start with sha265 when containers are started with the new compose-cli #701

Open
rakyi opened this issue Jun 7, 2021 · 3 comments

Comments

@rakyi
Copy link

rakyi commented Jun 7, 2021

  • What version of docker are you running?
    Docker version 20.10.6, build 370c289
  • What version of registrator are you running?
    v7
  • Did you build a custom version of registrator? If so, what is that image?
    No
  • What is the exact command you are running registrator with?
    registrator -internal=true -cleanup=true -ttl=30 -ttl-refresh=25 -retry-attempts=3 consul://consul:8500
  • What is the exact command you are running your container with?
    docker compose up
  • A log capture of all the docker events before, during, and after the issue.
  • If relevant, Dockerfile for application that is having issues.

Description of the problem:

When I run my containers with the new compose-cli (docker compose), registrator uses string "sha256" as the name/prefix for all services in Consul, e.g. Consul itself is registered as sha256-8300. Using old docker-compose works ok, e.g. Consul gets registered as consul-8300.

How reproducible:

Using this docker-compose.yml:

version: "3"

services:
  consul:
    image: consul:latest
    ports:
      - "8500:8500"
  registrator:
    image: gliderlabs/registrator
    command: "consul://consul:8500"
    depends_on:
      - consul
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock

When you run docker compose up you should see "sha256-8500" at http://localhost:8500/v1/catalog/services. Running docker-compose up instead you should see "consul-8500" being registered.

@jstaro
Copy link

jstaro commented Jul 12, 2021

Can confirm. Was hit by this myself.

Does anyone know of an alternative to this project since it seems dead/unmaintained? Would rather go down that road than trying to hack a fix in a self-maintained fork.

@brunocascio
Copy link

Can confirm. Was hit by this myself.

Does anyone know of an alternative to this project since it seems dead/unmaintained? Would rather go down that road than trying to hack a fix in a self-maintained fork.

This one? https://github.com/marcuslinke/registrator/tree/swarm-mode (latest image is marcuslinke/registrator:2019-03-28)

@jstaro
Copy link

jstaro commented Jul 13, 2021

@brunocascio
Thanks, that looks like it has a bunch of nice fixes. However, not surprisingly, it exhibits the same naming problem with Docker 20.10 and the docker compose v2 CLI.

Does anyone know if the problem could have to do with registrator itself, or maybe go-dockerclient?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants