Skip to content

Commit

Permalink
Merge pull request #2097 from pouchrobot/auto-doc-2018-08-15
Browse files Browse the repository at this point in the history
docs: auto generate pouch cli/api docs via code
  • Loading branch information
allencloud authored Aug 15, 2018
2 parents ccea89e + e8ed930 commit 796215c
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 1 deletion.
50 changes: 49 additions & 1 deletion docs/api/HTTP_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -1239,8 +1239,40 @@ json :
```


<a name="imagehistory"></a>
### 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** <br>*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`


<a name="imageinspect"></a>
### Inspect a image
### Inspect an image
```
GET /images/{imageid}/json
```
Expand Down Expand Up @@ -2299,6 +2331,22 @@ Information about a container's graph driver.
|**Name** <br>*required*|string|


<a name="historyresultitem"></a>
### HistoryResultItem
An object containing image history at API side.


|Name|Description|Schema|
|---|---|---|
|**Author** <br>*required*|the author of the build point.|string|
|**Comment** <br>*required*|a custom message set when creating the layer.|string|
|**Created** <br>*required*|the combined date and time at which the layer was created.|integer (int64)|
|**CreatedBy** <br>*required*|the command which created the layer.|string|
|**EmptyLayer** <br>*required*|mark whether the history item created a filesystem diff or not.|boolean|
|**ID** <br>*required*|ID of each layer image.|string|
|**Size** <br>*required*|size of each layer image.|integer (int64)|


<a name="hostconfig"></a>
### HostConfig
Container configuration that depends on the host we are running on
Expand Down
1 change: 1 addition & 0 deletions docs/commandline/pouch.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
45 changes: 45 additions & 0 deletions docs/commandline/pouch_history.md
Original file line number Diff line number Diff line change
@@ -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
<missing> 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

0 comments on commit 796215c

Please sign in to comment.