Skip to content

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

@rakyi

Description

@rakyi
  • 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.

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