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

Relax restrictions on service names #1519

Closed
aanand opened this issue Jun 5, 2015 · 10 comments
Closed

Relax restrictions on service names #1519

aanand opened this issue Jun 5, 2015 · 10 comments

Comments

@aanand
Copy link

aanand commented Jun 5, 2015

Now that we're not relying on a strict container name format, we should be able to allow more characters in service names, as has often been requested (see #799, #869, #941, #1300, #1384).

Any good reason we can't allow _.- now?

@thaJeztah
Copy link
Member

👍 I'll finally be able to build my

a_.--.__.--.__.--.__.--.__.--.__.--.__.--.__.--._ and 127.0.0.1:443 containers :D

@aanand
Copy link
Author

aanand commented Jun 5, 2015

Also relevant: allowed characters in image tags, since those are also based on service name. Seems to be the same chars though (tags.go).

@hoIIer
Copy link

hoIIer commented Jun 5, 2015

+1

@ghost
Copy link

ghost commented Jun 11, 2015

Is there anything new here? Will this change be part of the next RC or is it already baken into the current one?

@aanand
Copy link
Author

aanand commented Jun 11, 2015

1.3 is in code freeze, so this will not be in the next release.

@phazei
Copy link

phazei commented Jun 19, 2015

Is there anything happening with support on this?
In this comment #472 (comment) it's mentioned that there should be some support for this in 1.3.

I'm using 1.3 and it doesn't seem to be any different. Will there be a 1.3.1 or will we need to wait till 1.4 till anything other than [a-z0-9] is allowed for reasons of service/container/host compatibility/bug?

@aanand
Copy link
Author

aanand commented Jun 19, 2015

This won't be in 1.3, or any 1.3.x release. 1.4 is the likely target.

@aanand
Copy link
Author

aanand commented Jul 6, 2015

Closed by #1624.

@TristanCP
Copy link

"Any good reason we can't allow _.- now?"

There is a good reason for "_", since service names are used as host names in URLs :

"Note that while upper and lower case letters are allowed in domain
names, no significance is attached to the case. That is, two names with
the same spelling but different case are to be treated as if identical.

The labels must follow the rules for ARPANET host names. They must
start with a letter, end with a letter or digit, and have as interior
characters only letters, digits, and hyphen. There are also some
restrictions on the length. Labels must be 63 characters or less."

https://www.ietf.org/rfc/rfc1034.txt
https://stackoverflow.com/questions/2180465/can-domain-name-subdomains-have-an-underscore-in-it

If your try to reach a tomcat served URL inside from a container to an other container (using his service name), tomcat will pop a "java.lang.IllegalArgumentException: The character [_] is never valid in a domain name."

@held-m
Copy link

held-m commented Apr 19, 2023

I wasted a day because I'm using underscore in my docker-compose. But somebody uses RFC (RFC 822) for his product.
Lesson learned. Never use underscore in docker. Just letters, numbers and -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants