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

ServiceInfos expect container name with specific format. #81

Closed
tabiul opened this issue May 26, 2017 · 4 comments
Closed

ServiceInfos expect container name with specific format. #81

tabiul opened this issue May 26, 2017 · 4 comments
Assignees

Comments

@tabiul
Copy link

tabiul commented May 26, 2017

If I add container_name as part of my docker-compose.yml file then I am not able to call dockerCompose.servicesInfos.<service_name>.'<container_name>'. Looking at the code, the reason is due to this. In case the container_name is set then the pattern does not match. Is there a need for the pattern check ? Maybe I am missing something, is there anything wrong if we just use the value of inspection.Name excluding the / ?

@andrcuns
Copy link

By default, container name is constructed from projectName and Container name, so it adds some complexity on querying service infos, You kind of have to take in to account what the full name will look like. In tests it would be something ugly like gradle5729327650986943343projectdir, there fore it was decided to omit using the full container name.
Also with container_name variable, it's a bit tricky because it wouldn't be compatible with scale option for example, so that would most have to be handled as well.
Not sure what @augi thinks about this, but in automated testing scenarios, I don't see much benefit from using specific container_name variable.

@augi
Copy link
Member

augi commented May 26, 2017

Exactly - having hard-coded container name doesn't make sense in automated testing scenarios because it could easily collide on integration server etc.

Anyway, it would be nice to support also your use-case. I will look at it how complicated it would be.

E.g. we could check in the YAML file if container_name is specified.

@augi augi self-assigned this May 26, 2017
@tabiul
Copy link
Author

tabiul commented May 29, 2017

Thanks @augi

@augi
Copy link
Member

augi commented Jun 7, 2017

Released as 0.4.3.

@augi augi closed this as completed Jun 7, 2017
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

3 participants