mirror of
https://github.com/valentineus/simple-container.git
synced 2025-04-28 00:41:24 +03:00
Add an example and navigation links
This commit is contained in:
parent
0afd2000a5
commit
bd30227f01
49
README.md
49
README.md
@ -94,6 +94,29 @@ Details in
|
|||||||
[the documentation](https://github.com/apocas/dockerode#pull-from-private-repos).
|
[the documentation](https://github.com/apocas/dockerode#pull-from-private-repos).
|
||||||
|
|
||||||
## API
|
## API
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
<a href="#create">create(options)</a> ⇒ <code>Promise</code>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>Creates a container by options or name, returning the management interface.</p>
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a href="#get">get([id])</a> ⇒ <code>Promise</code>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>Returns the container management interface.</p>
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a href="#info">info([id])</a> ⇒ <code>Promise</code>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>Searches in existing containers.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<a name="create"></a>
|
||||||
|
|
||||||
### create(options) ⇒ <code>Promise</code>
|
### create(options) ⇒ <code>Promise</code>
|
||||||
Creates a container by options or name, returning the management interface.
|
Creates a container by options or name, returning the management interface.
|
||||||
|
|
||||||
@ -101,6 +124,8 @@ Creates a container by options or name, returning the management interface.
|
|||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| options | <code>String</code> \ <code>Object</code> | The name of the image or options |
|
| options | <code>String</code> \ <code>Object</code> | The name of the image or options |
|
||||||
|
|
||||||
|
<a name="get"></a>
|
||||||
|
|
||||||
### get([id]) ⇒ <code>Promise</code>
|
### get([id]) ⇒ <code>Promise</code>
|
||||||
Returns the container management interface.
|
Returns the container management interface.
|
||||||
|
|
||||||
@ -108,6 +133,19 @@ Returns the container management interface.
|
|||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| [id] | <code>String</code> | Container ID |
|
| [id] | <code>String</code> | Container ID |
|
||||||
|
|
||||||
|
#### Examples:
|
||||||
|
```JavaScript
|
||||||
|
containers.get().then(containers => {
|
||||||
|
/* containers - All containers in the system */
|
||||||
|
});
|
||||||
|
|
||||||
|
containers.get('5520e855dd2c301b23a718cf392f9619d1edc3dc0fa294559b725d7588ca807f').then(container => {
|
||||||
|
/* container - The specified container */
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
<a name="info"></a>
|
||||||
|
|
||||||
### info([id]) ⇒ <code>Promise</code>
|
### info([id]) ⇒ <code>Promise</code>
|
||||||
Searches in existing containers.
|
Searches in existing containers.
|
||||||
|
|
||||||
@ -115,6 +153,17 @@ Searches in existing containers.
|
|||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| [id] | <code>String</code> | Container ID |
|
| [id] | <code>String</code> | Container ID |
|
||||||
|
|
||||||
|
#### Examples:
|
||||||
|
```JavaScript
|
||||||
|
containers.info().then(containers => {
|
||||||
|
/* containers - All containers in the system */
|
||||||
|
});
|
||||||
|
|
||||||
|
containers.info('21ae4a54be582d13fffd796341b3561a8c8e0c59dd6c6c3239529188e2b3321d').then(container => {
|
||||||
|
/* container - The specified container */
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
## Debugging
|
## Debugging
|
||||||
Use the `DEBUG` variable with the `containers` option.
|
Use the `DEBUG` variable with the `containers` option.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user