-
Notifications
You must be signed in to change notification settings - Fork 113
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
support dynamic port assignment? #18
Comments
+1. This is super important if you want to run multiple of the same Docker image on the same host, which is a pretty common desire I imagine. |
We've encountered need for this as well, would a convention like
be a helpful change? |
I would jsut like to leave out the host port all together and let docker assign a port dynamically. |
Currently we can't leave the port out entirely because this is the mechanism that Centurion uses for identifying which container is your container. If you leave it to assign randomly, then it will not be able to find them to restart/stop them later when you need it to. The error message it gives should be much better, however, and this should be something we spell out in the README. We have talked about other ideas such as custom naming or tagging. So far we have not had a need to do either, but have leaned toward custom container naming. A PR implementing that would be welcome. |
So im almost done reimplementing centurion to use docker-api and once thats
|
This is pending changes to back Centurion with the API gem. |
Add production environments for be_site projects
Problematically for the best implementation, the docker-api gem uses a class variable to control the Docker URL which makes it very hard to use. This issue is now pending a wider scope project. |
We're approaching being able to handle dynamic ports. We'll be moving to identifying services by name rather than port. In Centurion 1.5.1 we made naming services the default. I'll be working on this shortly. |
💯 |
any news on when this will be rolled out? |
The support is all in for using containers solely by name thanks to @kremso and @intjonathan. There is more work needed to do dynamic ports, but it should be pretty small. We don't currently have it planned, but welcome a PR. |
In my rake file I would like to not specify the host_port value even if my container exposes a port. Is this possible? When I leave out that line I get the following error -
The text was updated successfully, but these errors were encountered: