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

Docker Recommendations for label syntax exclude underscores #362

Open
TechplexEngineer opened this issue May 12, 2022 · 4 comments
Open

Comments

@TechplexEngineer
Copy link

The docker recommendations for label syntax say that "Label keys should begin and end with a lower-case letter and should only contain lower-case alphanumeric characters, the period character (.), and the hyphen character (-)." https://docs.docker.com/config/labels-custom-metadata/

I am trying to use Balena to deploy Caddy with some other services that it reverse proxies. The label "caddy.reverse_proxy" is invalid per the validation in the Balena tool.

My first thought is to allow "hyphens" where underscores are used and convert them before rendering the caddy file.

I'd appreciate any thoughts.

Related thread on Balena Forum: https://forums.balena.io/t/docker-compose-label-constraints/55756

@francislavoie
Copy link
Collaborator

Yeah I'd say Balena should fix it. They're being overly restrictive for no good reason. It's always worked with underscores 🤷‍♂️

TechplexEngineer added a commit to TechplexEngineer/caddy-docker-proxy that referenced this issue May 12, 2022
This supports overly restrictive docker compose implementations

lucaslorentz#362
@TechplexEngineer
Copy link
Author

I agree with you, however I'm at their mercy. Would you be interested in a PR with a small change support hyphens as a replacement for underscores?

This seems like a pretty trivial change. The tests pass, but I'm not a caddy expert, are there any special cases we need to be sure to handle?
https://github.com/TechplexEngineer/caddy-docker-proxy/pull/1/files

@francislavoie
Copy link
Collaborator

That's gross. It really limits future use of - for another purpose later. Not a fan. I'd rather see if Balena would acquiesce to a change first.

@TechplexEngineer
Copy link
Author

I've submitted a support ticket, but given the age of that forum post, I'm not hopeful.

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