Closed eromoe closed 7 years ago
What version of docker are you running? 1.12
What version of registrator are you running? lastest
What is the exact command you are running registrator with?
docker run -d \ --name=registrator \ --net=host \ --volume=/var/run/docker.sock:/tmp/docker.sock \ gliderlabs/registrator:latest \ consul://localhost:8500
What is the exact command you are running your container with?
docker run -d \ -e "SERVICE_NAME=n1" \ -e "SERVICE_TAGS=master,backups" \ -e "SERVICE_REGION=fujian_2" \ -p 8001:80 \ --name n1 \ nginx
Description of the problem:
I start two nginx with -e "SERVICE_NAME=n1" and -e "SERVICE_NAME=n2" , but what I got in consul api is n1-80 and n2-80, why it append =80?? I don't want that.
-e "SERVICE_NAME=n1"
-e "SERVICE_NAME=n2"
n1-80
n2-80
=80
Steps to Reproduce:
docker run -d \ -p 8500:8500 \ -p 8600:53/udp \ --name consul \ progrium/consul \ -server \ -bootstrap \ -log-level debug
start two nginx with name n1 and n2
n1
n2
docker run -d \ -e "SERVICE_NAME=n1" \ -e "SERVICE_TAGS=master,backups" \ -e "SERVICE_REGION=fujian_2" \ -p 8001:80 \ --name n1 \ nginx docker run -d \ -e "SERVICE_NAME=n2" \ -e "SERVICE_TAGS=master,backups" \ -e "SERVICE_REGION=fujian_2" \ -p 8002:80 \ --name n2 \ nginx
Actual Results:
curl localhost:8500/v1/catalog/services?pretty { "consul": [], "consul-53": [ "udp" ], "consul-8500": [], "n1-80": [ "master", "backups" ], "n2-80": [ "master", "backups" ] }
Expected Results:
curl localhost:8500/v1/catalog/services?pretty { "consul": [], "consul-53": [ "udp" ], "consul-8500": [], "n1": [ "master", "backups" ], "n2": [ "master", "backups" ] }
See https://github.com/gliderlabs/registrator/pull/473
What version of docker are you running? 1.12
What version of registrator are you running? lastest
What is the exact command you are running registrator with?
What is the exact command you are running your container with?
Description of the problem:
I start two nginx with
-e "SERVICE_NAME=n1"
and-e "SERVICE_NAME=n2"
, but what I got in consul api isn1-80
andn2-80
, why it append=80
?? I don't want that.Steps to Reproduce:
start two nginx with name
n1
andn2
Actual Results:
Expected Results: