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:
Sebastiaan van Stijn 2021-04-24 16:59:25 +02:00
parent e0170da0dc
commit 5a5f8564ba
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -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",