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

Expose container ip address as maven properties #37

Closed
changgengli opened this issue Dec 17, 2014 · 1 comment
Closed

Expose container ip address as maven properties #37

changgengli opened this issue Dec 17, 2014 · 1 comment

Comments

@changgengli
Copy link

First, this is very nice work and I'm trying to use it to set up the integration test.

The problem I have is I have to bind the port number of a service in the container to a port of the host. This would make running several tests in parallel very diffcult and the port may have conflicts with the using port number of the host.

The solution I'm thinking is to expose the container's ip address as maven properties.
I just forked this repository and the orchestration-core, and add the support of this.

My changes and idea can be seen here:
http://git.io/vi5aeg
http://git.io/zDsWOA

This doesn't provide a generic way to expose any properties of the container, just the ip address.
If you think this is reasonable I can create a PR for this.

@alexec
Copy link
Owner

alexec commented Dec 17, 2014

Looks excellent! I'd like to suggest a couple of small changes:

  • Convention over configuration: can we always expose them?
  • Command query separation: rather than return the map from the start method, provide a new methods called something like 'getIps'?
  • Maybe add a prefix to the property name to avoid collision? E.g. 'Docker.example-project_app.ip'

@alexec alexec closed this as completed Dec 20, 2014
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

2 participants