Signed-off-by: Christopher Crone <christopher.crone@docker.com>
This commit is contained in:
Christopher Crone 2020-06-09 16:36:42 +02:00
Родитель 47eb2ee287
Коммит 868903f63d
1 изменённых файлов: 34 добавлений и 0 удалений

34
examples/README.md Normal file
Просмотреть файл

@ -0,0 +1,34 @@
# Examples
This folder contains examples of how to use the Docker CLI JavaScript SDK.
## Prerequisites
* [Node.js 10 or later](https://nodejs.org/en/download/)
* [yarn](https://yarnpkg.com/getting-started/install)
To run the examples you will need to have the Docker CLI API server running. You
can do this by running:
```console
$ docker serve --address unix:///tmp/backend.sock
```
To make sure that you have the example dependencies installed, use:
```console
$ yarn
```
## Running examples
You can then run any an example from the root of this repository as follows:
```console
$ npm run example examples/<file>
```
## List of examples
* [Listing contexts](./context-ls.ts)
* [Listing containers](./ps.ts)