From f281358ba2de6204a61cdb062fa67a8b7134739c Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Thu, 8 Feb 2018 12:45:18 +0100 Subject: [PATCH 1/3] Fix string type for buildargs API definition Signed-off-by: Jon Surrell --- api/swagger.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index cc3ee80cb2..a70906a140 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -6174,7 +6174,7 @@ paths: - name: "buildargs" in: "query" description: "JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)" - type: "integer" + type: "string" - name: "shmsize" in: "query" description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB." From de2b2b5e4ba0cb297d47a7b05614190fa44f54a2 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 12 Feb 2018 13:48:03 +0100 Subject: [PATCH 2/3] Reformat to multi-line Signed-off-by: Jon Surrell --- api/swagger.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index a70906a140..2262de6bfa 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -6173,7 +6173,12 @@ paths: type: "integer" - name: "buildargs" in: "query" - description: "JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)" + description: > + JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker + uses the buildargs as the environment context for commands run via the `Dockerfile` RUN + instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for + passing secret values. + [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) type: "string" - name: "shmsize" in: "query" From 344c73ac672cd4d4f70a08b5a41b6835d9873926 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 12 Feb 2018 14:02:54 +0100 Subject: [PATCH 3/3] Add example buildargs usage Signed-off-by: Jon Surrell --- api/swagger.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/swagger.yaml b/api/swagger.yaml index 2262de6bfa..8174ce387c 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -6178,6 +6178,12 @@ paths: uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. + + + For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the + the query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded. + + [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) type: "string" - name: "shmsize"