client: Allow Proxy Configuration in config.json#32966
Closed
dave-tucker wants to merge 1 commit intomoby:masterfrom
Closed
client: Allow Proxy Configuration in config.json#32966dave-tucker wants to merge 1 commit intomoby:masterfrom
dave-tucker wants to merge 1 commit intomoby:masterfrom
Conversation
This commit modifies config.json to allow for any proxies allowed in build-args to be configured. These values will then be used by default as build-args in docker build. Signed-off-by: Dave Tucker <[email protected]>
Contributor
Author
|
!rebuild powerpc #33041 |
dnephin
reviewed
May 5, 2017
Member
dnephin
left a comment
There was a problem hiding this comment.
You'll probably want to re-open this on docker/cli since this code is moving soon.
I think this can be tested with unit tests, it shouldn't need an integration test
Contributor
Author
|
Closing to re-open against |
This was referenced May 16, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a redux of #30588 rebased and after the repo move!
- What I did
Added a mechanism to allow HTTP/HTTPS/FTP/NO proxy variables to be configured in
config.json. These are then automatically populated in adocker runcommand as environment variables or asbuild-argsindocker build!This makes it easier for users suffering behind an HTTP Proxy as they only need to configure this once as opposed to creating custom aliases or forgetting the args and being denied buildage/runnage.
Updates #30323
- How I did it
Extended the
configfilewith some new proxy related variables.These are scoped per Docker Host with a
defaultcatchall.The config file is then read by the
buildorruncommand and the necessary variables are exported.A
-eflag or--build-argprovided on the CLI will override these default settings.- How to verify it
There are integration tests! But manually, you may:
config.jsonwith{ "proxies" : { "httpProxy" : "http://127.0.0.1:3001" }docker --config /path/to/config build -t configtest .HTTP_PROXYvariable is as configureddocker run --rm configtest env- Description for the changelog
Added HTTP/HTTPS/FTP proxy configuration to
config.json- A picture of a cute animal (not mandatory but encouraged)