| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
LGTM, thanks for the patch! |
Sorry, something went wrong.
|
wouldn't it make sense to add this to -p as well, or what would be the use case for exposing the range without publishing? |
Sorry, something went wrong.
|
@jfrazelle I thought about it but I only wanted to add code that originally intended by @jhorey. My thinking is the feature can be used with -P (which I tested) and certainly a new issue should be opened to add support for -p. |
Sorry, something went wrong.
|
gotcha |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
There was a problem hiding this comment.
This string is set from the flag code in runconfig/parse.go (and is updated using a script from the output of docker)
so needs to be set there. Can you also mention in that text the port-port format - I'm not sure we've used a - separator anywhere else, so a non-read the docs reminder would be good.
Sorry, something went wrong.
|
@SvenDowideit I have added the port range to the flag description. I went with a example for port range and hope that works. |
Sorry, something went wrong.
There was a problem hiding this comment.
Maybe instead of else do
for i := 0; 1 < len(l.Ports); {
p := l.Ports[i]
j := nextContiguous(l.Ports, p.Int(), i)
if j > i+1 {
env = append(env, fmt.Sprintf("%s_PORT_%s_%s_START=%s://%s:%s", alias, p.Port(), strings.ToUpper(p.Proto()), p.Proto(), l.ChildIP, p.Port()))
env = append(env, fmt.Sprintf("%s_PORT_%s_%s_ADDR=%s", alias, p.Port(), strings.ToUpper(p.Proto()), l.ChildIP))
env = append(env, fmt.Sprintf("%s_PORT_%s_%s_PROTO=%s", alias, p.Port(), strings.ToUpper(p.Proto()), p.Proto()))
env = append(env, fmt.Sprintf("%s_PORT_%s_%s_PORT_START=%s", alias, p.Port(), strings.ToUpper(p.Proto()), p.Port()))
q := l.Ports[j]
env = append(env, fmt.Sprintf("%s_PORT_%s_%s_END=%s://%s:%s", alias, p.Port(), strings.ToUpper(q.Proto()), q.Proto(), l.ChildIP, q.Port()))
env = append(env, fmt.Sprintf("%s_PORT_%s_%s_PORT_END=%s", alias, p.Port(), strings.ToUpper(q.Proto()), q.Port()))
i = j + 1
continue
}
env = append(env, fmt.Sprintf("%s_PORT_%s_%s=%s://%s:%s", alias, p.Port(), strings.ToUpper(p.Proto()), p.Proto(), l.ChildIP, p.Port()))
env = append(env, fmt.Sprintf("%s_PORT_%s_%s_ADDR=%s", alias, p.Port(), strings.ToUpper(p.Proto()), l.ChildIP))
env = append(env, fmt.Sprintf("%s_PORT_%s_%s_PORT=%s", alias, p.Port(), strings.ToUpper(p.Proto()), p.Port()))
env = append(env, fmt.Sprintf("%s_PORT_%s_%s_PROTO=%s", alias, p.Port(), strings.ToUpper(p.Proto()), p.Proto()))
i++
}Just my personal preference.
Sorry, something went wrong.
There was a problem hiding this comment.
Changed code as above, it is lot cleaner.
Sorry, something went wrong.
|
The commandline flags documented in cli.md and docker-run.man1.md should be identical to that in the code. and can you squash your commits when you rebase? |
Sorry, something went wrong.
|
@SvenDowideit I squashed my commits and Please see the change to --expose flag, is that what you refer to? |
Sorry, something went wrong.
There was a problem hiding this comment.
This is the text that should be used in docker-run.1.md, cli.md and run.md - as the text written should look identical to what the user sees when they type docker run ---help.
I have a script that will update it for you (though you need to ignore some of its changes) - docs/docs-update.py ./bundles/1.2.0-dev/binary/docker - this will use your modified docker binary to update the documentation. :)
Sorry, something went wrong.
|
thanks @SvenDowideit, that is a cool tool. I did selectively updated the docs using the tool. |
Sorry, something went wrong.
|
this needs a rebase and I think we are just waiting on docs approval? |
Sorry, something went wrong.
|
Thanks, I just did a rebase |
Sorry, something went wrong.
|
Please let me know if there is anything missing? I am still waiting for this merge. @SvenDowideit are the docs look good? |
Sorry, something went wrong.
Sorry, something went wrong.
|
Docs LGTM |
Sorry, something went wrong.
|
Docs LGTM |
Sorry, something went wrong.
|
@jfrazelle @crosbymichael , Docs are happy :) |
Sorry, something went wrong.
|
Rebased and I hope this can be merged soon. |
Sorry, something went wrong.
|
@brahmaroutu this needs a rebase and then it seems like we should be good to merge sorry for the delay |
Sorry, something went wrong.
|
also so GH automatically closes the issue can you change the "Addresses" in your first comment to Closes |
Sorry, something went wrong.
Closes moby#1834 Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
|
I addressed both the comments. |
Sorry, something went wrong.
adding support for port ranges on --expose
|
It doesn't look like there is corresponding support for publishing a range of ports, just for exposing them. Is there an open issue for that? I couldn't find one. In most cases, people are doing to want to do a verbatim mapping instead of doing --publish-all, since these port ranges are often used in cases where the server has a well-known port (or multiple) and hands out port assignments as part of a protocol. |
Sorry, something went wrong.
|
Yes I am aware of that, it was commented earlier about this issue. I can work on that as this is merged. |
Sorry, something went wrong.
|
That's great. If there's an open issue, I'd like to subscribe to it. I can create one otherwise. Thanks! |
Sorry, something went wrong.
|
Please open an issue. |
Sorry, something went wrong.
|
Is it possible to also do this from the Dockerfile? EXPOSE 3300-3310 |
Sorry, something went wrong.
|
@dkirrane yes, you can do EXPOSE 3300-3310 from Dockerfile |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Addresses #1834
Signed-off-by: Srini Brahmaroutu srbrahma@us.ibm.com