diff --git a/README.md b/README.md index 5fc2c20..fd6e25f 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,29 @@ Details in [the documentation](https://github.com/apocas/dockerode#pull-from-private-repos). ## API +
Promise
+ Creates a container by options or name, returning the management interface.
+Promise
+ Returns the container management interface.
+Promise
+ Searches in existing containers.
+Promise
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 | String
\ Object
| The name of the image or options |
+
+
### get([id]) ⇒ Promise
Returns the container management interface.
@@ -108,6 +133,19 @@ Returns the container management interface.
| --- | --- | --- |
| [id] | String
| Container ID |
+#### Examples:
+```JavaScript
+containers.get().then(containers => {
+ /* containers - All containers in the system */
+});
+
+containers.get('5520e855dd2c301b23a718cf392f9619d1edc3dc0fa294559b725d7588ca807f').then(container => {
+ /* container - The specified container */
+});
+```
+
+
+
### info([id]) ⇒ Promise
Searches in existing containers.
@@ -115,6 +153,17 @@ Searches in existing containers.
| --- | --- | --- |
| [id] | String
| Container ID |
+#### Examples:
+```JavaScript
+containers.info().then(containers => {
+ /* containers - All containers in the system */
+});
+
+containers.info('21ae4a54be582d13fffd796341b3561a8c8e0c59dd6c6c3239529188e2b3321d').then(container => {
+ /* container - The specified container */
+});
+```
+
## Debugging
Use the `DEBUG` variable with the `containers` option.