-
Notifications
You must be signed in to change notification settings - Fork 2k
optionally add docker host to proxy excludes in env command #631
Conversation
|
@SvenDowideit your thoughts? |
|
I haven't had time to review this but @databus23 I'd suggest you please break this down into several smaller functions- that's a lot of stuff for just one function to do. |
|
@nathanleclaire Sure. I agree its quite a lot of code for one method and can be structured better. But before I spend more time on this can we agree that there is a problem and a solution would be considered for a merge? |
|
@databus23 yes i think this would be beneficial |
|
@databus23 Yes, I am in favor of the feature. I have a question: If the user wants to connect to a remote instance, they will actually want to use the proxy to enable internet connectivity, no? How is that case handled? Also, side note for @ehazlett : this logic is really getting hairy enough that we should eventually move to using a text/template to generate these commands instead. |
|
+1 for |
|
@nathanleclaire Yes, for remote instances the user might actually need the proxy to get to the instance. Thats why I implemented it as an optional boolean flag |
|
@databus23 Ah, of course - the flag. I'm sorry, I'm being thick due to this recent flurry of activity. At any rate, if you break that into a few smaller functions and especially if you add some unit tests (for these new functions - don't feel responsible for |
|
Some guidance on how to structure the subroutines: please pass in the values from |
|
@nathanleclaire I'm not sure I understand your guidance, could you maybe elaborate? |
Most important thing is to parse what you need out of |
|
@databus23 Any followup on this? |
|
Not yet. But I'm still interested in seeing this in machine. #1676 is kind of a duplicate of this issue btw. |
fcb75cf to
5da8457
Compare
|
I updates the pull request against latest master. This will add the docker host ip to the This fixes #1676 which has ben labeled Thoughts? |
|
Nice, I'll make sure to take a look. |
5da8457 to
12f1a78
Compare
|
Rebased on top of current master. Circles is still in a moody. |
153fed8 to
0745d93
Compare
|
Rebased on current master. All green. |
|
This is rad! Code looks pretty good. Could I get you to add a section to |
This optinal flag will add the docker host to the no_proxy environement variable. This is useful for local providers (e.g. virtualbox, fusion) in environments where an http_proxy is set and docker by default tries to connect to the ip via the proxy. Signed-off-by: Fabian Ruff <fabian@progra.de>
0745d93 to
44cb170
Compare
44cb170 to
686e94e
Compare
|
@nathanleclaire documentation added. |
Signed-off-by: Fabian Ruff <fabian@progra.de>
686e94e to
75885c3
Compare
|
Alright, sorry about this but I've just merged the rather large |
|
Update: I have successfully rebased so you won't need to worry about that. I will make a PR on your repo which you can merge (as well as add a few integration tests for this feature), and then we can merge this upstream! |
|
@nathanleclaire you beat me to it by minutes. :) |
|
:D |
|
Carried it in my own PR to make things a little easier 👍 |
This adds a
--no-proxyflag to thedocker-machine envcommand.When set it will take care of adding (and removing) the docker host to/from the NO_PROXY environment variable.
This helps using docker-machine with docker >=1.5 with local vm providers (e.g. fusion, virtualbox) in coporate networks where an http proxy is required for internet connectivity.
Since version 1.5 the docker client picks up the HTTP_PROXY environment variable when connecting to the docker daemon. This does not work well for the local vm use case. In that case the docker host is inside a local virtual network only reachable from the workstation itself.
@ehazlett This pull request also has the intention to illicit some feedback from you regarding this PR boot2docker/boot2docker-cli#345 :)