Skip to content

Repository files navigation

GitHub package.json versionnpm bundle sizeGitHub Workflow StatusNPM

lup-docker

NodeJS library to interact with the Docker engine.

Example

JavaScript:

constDocker=require('lup-docker');// List of all containersconstcontainers=awaitDocker.getContainers().then(result=>result.success||[]);console.log(containers);// Stream of a containers utilization statsconststatsStream=awaitDocker.getContainerStatsStream('busybox').then(result=>result.success);if(statsStream){conststatsReader=statsStream.getReader();while(true){const{ done, value }=awaitstatsReader.read();if(done)break;// Process the stats dataconsole.log(value);}}

TypeScript:

importlupSystemfrom'lup-docker';// List of all containersconstcontainers=awaitDocker.getContainers().then(result=>result.success||[]);console.log(containers);// Stream of a containers utilization statsconststatsStream=awaitDocker.getContainerStatsStream('busybox').then(result=>result.success);if(statsStream){conststatsReader=statsStream.getReader();while(true){const{ done, value }=awaitstatsReader.read();if(done)break;// Process the stats dataconsole.log(value);}}

About

NodeJS library to interact with a Docker engine.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages