-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Fig port command #402
Fig port command #402
Conversation
Cool! Thanks Daniel! Perhaps this could be called "fig port"? It seems to behave like the "docker port" command. |
Oh, so it is! Sure, |
Changed to |
Suggestion: output HostIp as well. Docker port already does that, and it's really useful for multihost deployments. And to boot, fig ps should probably output the HostIp as well to keep consistency. |
+1 on including the hostname in both |
…ice. Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Include hostname in |
Looking good. Any chance we could add |
Oh right, I forgot the docs. Added to the usage text and |
+1 |
LGTM |
""" | ||
for container in self.client.containers(): | ||
if not self.has_container(container): | ||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we're not just using self.containers()
here, instead of manually filtering?
LGTM |
…ice. Signed-off-by: Daniel Nephin <dnephin@gmail.com>
7ccac7f
to
c48ee5c
Compare
rebased to resolve merge conflicts |
Fig port command Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
Fix a description error
This branch adds a new fig command, which returns the local port binding of a service.
It's used when you want to run a test suite (or something else) outside of a docker image, so you can connect to one of your containers easily.
I will be using it mostly programatically, but I thought I'd add a command at the same time.