From e9421479d126c8c78b808e2e992709a6653e1384 Mon Sep 17 00:00:00 2001 From: baude Date: Mon, 23 Sep 2019 15:59:42 -0500 Subject: Document the required varlink build args The API document incorrectly documented the wrong varlink build arguments. The output attribute is required. Fixes: #3204 Signed-off-by: baude --- API.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'API.md') diff --git a/API.md b/API.md index f0e5cf18f..3d2a6b01f 100755 --- a/API.md +++ b/API.md @@ -304,8 +304,43 @@ method AttachControl(name: [string](https://godoc.org/builtin#string)) method BuildImage(build: [BuildInfo](#BuildInfo)) [MoreResponse](#MoreResponse) BuildImage takes a [BuildInfo](#BuildInfo) structure and builds an image. At a minimum, you must provide the -'dockerfile' and 'tags' options in the BuildInfo structure. It will return a [MoreResponse](#MoreResponse) structure +contextDir tarball path, the 'dockerfiles' path, and 'output' option in the BuildInfo structure. The 'output' +options is the name of the of the resulting build. It will return a [MoreResponse](#MoreResponse) structure that contains the build logs and resulting image ID. +#### Example +~~~ +$ sudo varlink call -m unix:///run/podman/io.podman/io.podman.BuildImage '{"build":{"contextDir":"/tmp/t/context.tar","dockerfiles":["Dockerfile"], "output":"foobar"}}' +{ + "image": { + "id": "", + "logs": [ + "STEP 1: FROM alpine\n" + ] + } +} +{ + "image": { + "id": "", + "logs": [ + "STEP 2: COMMIT foobar\n" + ] + } +} +{ + "image": { + "id": "", + "logs": [ + "b7b28af77ffec6054d13378df4fdf02725830086c7444d9c278af25312aa39b9\n" + ] + } +} +{ + "image": { + "id": "b7b28af77ffec6054d13378df4fdf02725830086c7444d9c278af25312aa39b9", + "logs": [] + } +} +~~~ ### func BuildImageHierarchyMap
-- cgit v1.2.3-54-g00ecf