docker-client-ts
v0.0.15
Published
Auto generated client for the Docker Engine API with a fluent interface and strong typings
Downloads
572
Readme
docker-client-ts
installation
npm add docker-client-ts
usage
import { DockerClient } from "docker-client-ts";
const docker = await DockerClient({
baseURL: new URL("unix:/var/run/docker.sock"),
ssh: {
user: "username",
host: "127.0.0.1",
port: 22,
key: Buffer.from("ssh private key", "utf8"),
},
});
const { Id } = await client.Container.Create({
body: {
Image: "debian",
Cmd: ["bash"],
Tty: true,
},
});
await client.Container.Start({
path: { id: Id },
});
see tests for more example usage