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

Link aliases using containerName makes it impossible to link 2 containers which expect different aliases #277

Closed
johnmccabe opened this issue Apr 14, 2016 · 4 comments

Comments

@johnmccabe
Copy link
Member

Its doesn't appear to be possibly to link 2 containers which use different aliases to the same container via clocker yaml, for example this compose has 2 containers connecting to the same db, but they are implemented expecting different aliases.

dbbackup:
  image: mydbbackup
  links:
    - db:db

wordpress:
  image: wordpress
  links:
    - db:mysql
  ports:
    - 9090:80

db:
  image: mariadb
  environment:
    MYSQL_ROOT_PASSWORD: example

We can't currently support this in Clocker as the alias is instead pulled from the entity being connected to via the ContainerName and as such can only be set to one value so only one of the connecting containers can be satisfied.
Perhaps switching docker.container.links from a list to a map of ' alias: targetEntity'? wdyt @grkvlt ?

@grkvlt
Copy link
Member

grkvlt commented Apr 14, 2016

@johnmccabe yes, could do that - would be nice to support autodetect of aliases as well, somehow - maybe two config keys?

@grkvlt grkvlt added this to the Version 1.1.0 milestone Apr 14, 2016
@johnmccabe
Copy link
Member Author

@grkvlt could you elaborate on the autodetection idea?

@johnmccabe
Copy link
Member Author

It should also resolve the current problem using containerName where you're limited to only one occurrence of that entity as we should be able to switch to using randomly generated unique container names only.

@grkvlt
Copy link
Member

grkvlt commented Apr 25, 2016

Fixed by #272

@grkvlt grkvlt closed this as completed Apr 25, 2016
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

2 participants