mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
builder/dockerfile: add "ALL_PROXY" to list of default build args
Relates to a82fff6377/docs/packages.md (proxies)
> (..) the first four of these are the standard built-in build-arg options
> available for `docker build`
> (..) The last, `all_proxy`, is a standard var used for socks proxying. Since
> it is not built into `docker build`, if you want to use it, you will need to
> add the following line to the dockerfile:
>
> ARG all_proxy
Given the we support all other commonly known proxy env-vars by default, it makes
sense to add this one as well.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
e0170da0dc
commit
5a5f8564ba
2 changed files with 4 additions and 0 deletions
|
@ -19,6 +19,8 @@ var builtinAllowedBuildArgs = map[string]bool{
|
|||
"ftp_proxy": true,
|
||||
"NO_PROXY": true,
|
||||
"no_proxy": true,
|
||||
"ALL_PROXY": true,
|
||||
"all_proxy": true,
|
||||
}
|
||||
|
||||
// BuildArgs manages arguments used by the builder
|
||||
|
|
|
@ -19,6 +19,7 @@ func TestGetAllAllowed(t *testing.T) {
|
|||
"ArgOverriddenByOptions": strPtr("fromopt2"),
|
||||
"ArgNoDefaultInDockerfileFromOptions": strPtr("fromopt3"),
|
||||
"HTTP_PROXY": strPtr("theproxy"),
|
||||
"all_proxy": strPtr("theproxy2"),
|
||||
})
|
||||
|
||||
buildArgs.AddMetaArg("ArgFromMeta", strPtr("frommeta1"))
|
||||
|
@ -35,6 +36,7 @@ func TestGetAllAllowed(t *testing.T) {
|
|||
all := buildArgs.GetAllAllowed()
|
||||
expected := map[string]string{
|
||||
"HTTP_PROXY": "theproxy",
|
||||
"all_proxy": "theproxy2",
|
||||
"ArgOverriddenByOptions": "fromopt2",
|
||||
"ArgWithDefaultInDockerfile": "fromdockerfile1",
|
||||
"ArgNoDefaultInDockerfileFromOptions": "fromopt3",
|
||||
|
|
Loading…
Add table
Reference in a new issue