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

Change docker label format. Should not support bracket chars #30

Open
mattmcclean opened this issue Jan 11, 2016 · 3 comments
Open

Change docker label format. Should not support bracket chars #30

mattmcclean opened this issue Jan 11, 2016 · 3 comments

Comments

@mattmcclean
Copy link
Contributor

Hi,

I am trying to use this sidecar container in an architecture with Amazon EC2 Container Service (ECS). When I try to configure an ECS task definition with the label format connect[8081]=stock-price.service.consul it gives the following error message:

Docker label key connect[8081] contains invalid characters, does not match pattern ^[a-z0-9-.]+$

According to the docker spec the ECS service is correct in checking that the labels contain only lower-cased alphanumeric characters, dots and dashes (see: https://docs.docker.com/engine/userguide/labels-custom-metadata/). It seems however that docker engine is not strict in enforcing this.

Is there any chance this can be changed to support valid Docker tag as per the spec?

@progrium
Copy link
Contributor

Yes, I'm open to proposals.

On Mon, Jan 11, 2016 at 12:35 PM, Matt McClean [email protected]
wrote:

Hi,

I am trying to use this sidecar container in an architecture with Amazon
EC2 Container Service (ECS) When I try to configure an ECS task definition
with the label format connect[8081]=stock-priceserviceconsul it gives the
following error message:

Docker label key connect[8081] contains invalid characters, does not match
pattern ^[a-z0-9-]+$

According to the docker spec the ECS service is correct in checking that
the labels contain only lower-cased alphanumeric characters, dots and
dashes (see:
https://docsdockercom/engine/userguide/labels-custom-metadata/) It seems
however that docker engine is not strict in enforcing this

Is there any chance this can be changed to support valid Docker tag as per
the spec?


Reply to this email directly or view it on GitHub
#30.

Jeff Lindsay
http://progrium.com

@mattmcclean
Copy link
Contributor Author

How about having a "dot" separator instead between connect and the port number? An example would be

$ docker run -d --name myservice \
        -l connect.6000=redis.service.consul \
        -l connect.3306=master.mysql.service.consul \
        example/myservice

@progrium
Copy link
Contributor

That's what I was thinking it would have to be. Alright, now if somebody can submit a PR for it. ;)

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

2 participants