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

Shorten git version to generate correct container DNS hostname #412

Closed

Conversation

xiaohui-zhangxh
Copy link
Contributor

Here I got a problem on resolving app IP address by container name, like this 'myapp-web-staging-599126a8f6c31f286636a8675226d4ab6585287c_uncommitted_94602f20085489c4' has 87 chars, according to https://en.wikipedia.org/wiki/Subdomain#Overview , "Each label may contain from 0 to 63 [octets]", this is invalid subdomain, so I can't container IP with:

/srv/www # ping myapp-web-staging-599126a8f6c31f286636a8675226d4ab6585287c_uncommitted_94602f20085489c4
ping: bad address 'myapp-web-staging-599126a8f6c31f286636a8675226d4ab6585287c_uncommitted_94602f20085489c4'

We can get short git version instead of long one, and make a version as short as possible.

@hey-leon
Copy link

hey-leon commented Aug 9, 2023

I would also be interested in this @xiaohui-zhangxh. I posted a PR recently. Different solution to yours #409. I think I would be happy with either but I agree I think shortening the container name would be good.

@xiaohui-zhangxh
Copy link
Contributor Author

@hey-leon didn't notice you have created one. Closing due to duplicate

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

Successfully merging this pull request may close these issues.

2 participants