node-sdk/examples
Djordje Lukic 2f1b3a74d1 Add example for start/stop
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-08-13 16:15:40 +02:00
..
README.md Add context create/use before running examples 2020-06-15 09:33:27 +02:00
context-ls.ts Add example for start/stop 2020-08-13 16:15:40 +02:00
exec.ts Add license 2020-07-06 15:41:19 +02:00
ps.ts Add example for start/stop 2020-08-13 16:15:40 +02:00
start-stop.ts Add example for start/stop 2020-08-13 16:15:40 +02:00

README.md

Examples

This folder contains examples of how to use the Docker CLI JavaScript SDK.

Prerequisites

To run the examples you will need to have an ACI context as default and the Docker CLI API server running. You can do this by running:

$ docker context create aci-context aci
$ docker context use aci-context
$ docker serve --address unix:///tmp/backend.sock

To make sure that you have the example dependencies installed, use:

$ yarn

Running examples

You can then run any an example from the root of this repository as follows:

$ npm run example examples/<file>

List of examples