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

Allow dynamic port binding #66

Closed
lordofthejars opened this issue Jan 20, 2015 · 2 comments
Closed

Allow dynamic port binding #66

lordofthejars opened this issue Jan 20, 2015 · 2 comments

Comments

@lordofthejars
Copy link
Member

Allow dynamic port binding so the bind port to an exposed port is assigned automatically from random port. In this way we will be able to run tests in parallel without having port collisions.

@lordofthejars
Copy link
Member Author

Dynamic port binding is done by setting one property to true (PublishAllPorts).
To implement this feature we are going to add a new possible value in PortBinding property. Instead of passing an array you can also pass a string with dynamic.

portBindings: dynamic

This means we should take care of having an instanceof when getting port binding between an array or an string.

In Docker docs says: PublishAllPorts - Allocates a random host port for all of a container's exposed ports. Specified as a boolean value.

@lordofthejars
Copy link
Member Author

Thinking better because PublishAllPortsis a property that you can set in configuration file, the developer is free to not specify any portbind and set this property to true.

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

1 participant