From e8ed9308b9717187c937aa8ce813ec47ac382628 Mon Sep 17 00:00:00 2001 From: pouchrobot Date: Wed, 15 Aug 2018 03:06:42 +0000 Subject: [PATCH] docs: auto generate pouch cli docs via code Signed-off-by: pouchrobot --- docs/api/HTTP_API.md | 50 ++++++++++++++++++++++++++++++- docs/commandline/pouch.md | 1 + docs/commandline/pouch_history.md | 45 ++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 docs/commandline/pouch_history.md diff --git a/docs/api/HTTP_API.md b/docs/api/HTTP_API.md index bb45d647e..564b2afd4 100644 --- a/docs/api/HTTP_API.md +++ b/docs/api/HTTP_API.md @@ -1239,8 +1239,40 @@ json : ``` + +### Get an image's history +``` +GET /images/{imageid}/history +``` + + +#### Description +Return the history of each layer of image + + +#### Parameters + +|Type|Name|Description|Schema| +|---|---|---|---| +|**Path**|**imageid**
*required*|Image name or id|string| + + +#### Responses + +|HTTP Code|Description|Schema| +|---|---|---| +|**200**|no error|< [HistoryResultItem](#historyresultitem) > array| +|**404**|An unexpected 404 error occurred.|[Error](#error)| +|**500**|An unexpected server error occurred.|[Error](#error)| + + +#### Produces + +* `application/json` + + -### Inspect a image +### Inspect an image ``` GET /images/{imageid}/json ``` @@ -2299,6 +2331,22 @@ Information about a container's graph driver. |**Name**
*required*|string| + +### HistoryResultItem +An object containing image history at API side. + + +|Name|Description|Schema| +|---|---|---| +|**Author**
*required*|the author of the build point.|string| +|**Comment**
*required*|a custom message set when creating the layer.|string| +|**Created**
*required*|the combined date and time at which the layer was created.|integer (int64)| +|**CreatedBy**
*required*|the command which created the layer.|string| +|**EmptyLayer**
*required*|mark whether the history item created a filesystem diff or not.|boolean| +|**ID**
*required*|ID of each layer image.|string| +|**Size**
*required*|size of each layer image.|integer (int64)| + + ### HostConfig Container configuration that depends on the host we are running on diff --git a/docs/commandline/pouch.md b/docs/commandline/pouch.md index 292791b15..1746c5ed7 100644 --- a/docs/commandline/pouch.md +++ b/docs/commandline/pouch.md @@ -25,6 +25,7 @@ pouch is a client side tool pouch to interact with daemon side process pouchd. F * [pouch events](pouch_events.md) - Get real time events from the daemon * [pouch exec](pouch_exec.md) - Exec a process in a running container * [pouch gen-doc](pouch_gen-doc.md) - Generate docs +* [pouch history](pouch_history.md) - Display history information on image * [pouch image](pouch_image.md) - Manage image * [pouch images](pouch_images.md) - List all images * [pouch info](pouch_info.md) - Display system-wide information diff --git a/docs/commandline/pouch_history.md b/docs/commandline/pouch_history.md new file mode 100644 index 000000000..d9c4bcbcc --- /dev/null +++ b/docs/commandline/pouch_history.md @@ -0,0 +1,45 @@ +## pouch history + +Display history information on image + +### Synopsis + +Return the history information about image + +``` +pouch history [OPTIONS] IMAGE +``` + +### Examples + +``` +pouch history busybox:latest +IMAGE CREATED CREATED BY SIZE COMMENT +e1ddd7948a1c 1 week ago /bin/sh -c #(nop) CMD ["sh"] 0.00 B + 1 week ago /bin/sh -c #(nop) ADD file:96fda64a6b725d4... 716.06 KB +``` + +### Options + +``` + -h, --help help for history + --human Print information in human readable format (default true) + --no-trunc Do not truncate output + -q, --quiet Only show image numeric ID +``` + +### Options inherited from parent commands + +``` + -D, --debug Switch client log level to DEBUG mode + -H, --host string Specify connecting address of Pouch CLI (default "unix:///var/run/pouchd.sock") + --tlscacert string Specify CA file of TLS + --tlscert string Specify cert file of TLS + --tlskey string Specify key file of TLS + --tlsverify Use TLS and verify remote +``` + +### SEE ALSO + +* [pouch](pouch.md) - An efficient container engine +