Docker CLI gRPC JavaScript SDK
Перейти к файлу
dependabot[bot] 0f74d1b368
Bump ini from 1.3.5 to 1.3.8
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-13 06:03:30 +00:00
.github Replace set-env, deprecated in GH actions. Using [GH actions env files] (https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files) 2020-11-24 12:19:26 +01:00
examples Sync gRPC Compose API, added compose example 2020-11-17 11:54:08 +01:00
scripts Remove token not required anymore 2020-09-25 09:56:50 +02:00
src Fix tabs vs spaces & sync protos 2020-11-17 18:34:39 +01:00
test license: Update headers 2020-09-25 09:40:55 +02:00
.dockerignore Containerize proto generation and test 2020-08-17 10:48:01 +02:00
.eslintrc.js Add eslint config 2020-06-09 18:26:54 +02:00
.gitignore gitignore: Add build artifacts 2020-08-18 16:44:48 +02:00
Dockerfile Remove token not required anymore 2020-09-25 09:56:50 +02:00
LICENSE Add license 2020-07-06 15:41:19 +02:00
Makefile Remove token not required anymore 2020-09-25 09:56:50 +02:00
NOTICE license: Update headers 2020-09-25 09:40:55 +02:00
README.md Remove unused dependecies 2020-07-08 14:45:43 +02:00
babel.config.js Add exec example 2020-06-12 15:41:56 +02:00
package.json Upgrade google-auth-library and dependencies 2020-11-02 15:38:50 +01:00
protos.sh Add Volume management API & example 2020-09-29 11:25:01 +02:00
publish.sh license: Update headers 2020-09-25 09:40:55 +02:00
tsconfig.json Add publish.sh script to publish on npm 2020-07-07 10:04:09 +02:00
yarn.lock Bump ini from 1.3.5 to 1.3.8 2020-12-13 06:03:30 +00:00

README.md

Docker CLI JavaScript SDK

CI

This repository contains the source for the Node SDK to work with the experimental Docker command line for Azure integration. The SDK is available as an npm package

⚠️ This SDK is in beta, expect things to change or break!

Getting started

Add @docker/sdk to the dependencies

yarn add @docker/sdk

You can then use the SDK:

// import the contexts client
import { Contexts } from '@docker/sdk';
// import request and response classes
import { ListRequest, ListResponse } from '@docker/sdk/contexts';

const client = new Contexts();

// Get the list of contexts
client.list(new ListRequest(), (err: any, resp: ListResponse) => {
  if (err) {
    console.error(err);
    return;
  }

  const contexts = resp.getContextsList().map((c) => c.getName());

  console.log(contexts);
});

When you run this code you should see a list of contexts, for example:

$ ts-node example.ts
aci-context
default

Examples

You can find examples for how to use this SDK in the examples directory.