Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: dockerode
node v8.17.0
endpoint
share
tweet
const Docker = require('dockerode') const runListContainer = async (me, opts, callback) => { let docker = new Docker(); let containers = await docker.listContainers(opts); return containers; } console.log('a'); let a= null; runListContainer().then( x => {console.log('x: ${x}')}, err => {a=err; console.log(err)} ); let kk = false; function check() { if (a===null) { setTimeout(check, 10); } else { kk = true; } } while (kk !== true) {}; console.log("bbbbbbbbbbbbbbbb", a); console.log('b');
Created from: https://npm.runkit.com/dockerode
Loading…
Clone and edit this document