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
Service which is deployed as part of a stack has an illegal character in its DNS name #37632
Comments
Just ran into this issue now. The newer versions of the Java InfluxDb client library has changed to use |
we are facing this exact issue in deploying dgraph as well. a lot of go libraries refuse to parse underscore in hostnames. |
Any update? Can't imagine Docker has such problem and no fix immediately. |
@arkodg PTAL |
changing the format now will disrupt legacy systems |
I understand the backwards compatibility issue, but a flag or configuration option to let users opt into generating RFC 921–compatible DNS names (“must start with a letter, end with a letter or digit and have only letters or digits or hyphen as interior characters”) would nonetheless be nice. |
Description
When a service is created as part of a stack it is given a DNS name in the form of
<stack>_<service>
. According to RFC-952 a host or domain name is "a text string up to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus sign (-), and period (.)." (The maximum length has since been extended in RFC-1123.)The underscore (_) is problematic since it does not adhere to the specification. Parsers which are strict about the characters, for example the one in class
java.net.URI
as part of the Java programming language runtime, fail to parse the DNS name.Please consider changing the scheme how a DNS name is defined for a service. Natural alternative to the underscore would be the minus sign (-).
Steps to reproduce the issue:
mystack.yml
:Describe the results you received:
Services have names
mystack_web1
andmystack_web2
.Describe the results you expected:
I was expecting the names to be RFC compliant, for example
mystack-web1
andmystack-web2
.Output of
docker version
:Output of
docker info
:The text was updated successfully, but these errors were encountered: