-
Notifications
You must be signed in to change notification settings - Fork 8
readme with html
Bart edited this page Oct 16, 2014
·
1 revision
docker convenience functions on top of dockerode
Table of Contents generated with DocToc
var dockops = require('dockops')
var docker = dockops.createDocker({ dockerhost: dockerhost });
var images = new dockops.Images(docker);
dockops.logEvents(images, 'verbose');
var containers = new dockops.Containers(docker);
dockops.logEvents(containers, 'verbose');
build('test:uno', testUnoTar, function () {
build('toast:uno', toastUnoTar, function () {
containers.run(.. // run test:uno and toast:uno containers
containers.listRunning(function (err, res) {
inspect(res);
containers.stopRemoveGroup('test', function (err, res) {
containers.listRunning(function (err, res) {
inspect(res);
http.request({ port: 49222 }, function (res) {
console.log('--------------------------')
inspect({ status: res.statusCode, headers: res.headers })
res.pipe(process.stdout)
}).end()
})
})
})
})
})
npm install dockops
-
Creates a new containers instance that will use the given docker instance to communicate with docker.
Name Type Description docker
Object dockerode instance to communicate with docker
- Source:
initialized containers
- Type
- Object
-
Lists all running containers by the ports they expose.
Name Type Description cb
function called back with list of containers hashed by their port number
- Source:
-
Stops and/or kills and then removes a container.
Heavy machinery clean operation. It was useful when running on arch with docker not always working as promised. This may not be needed anymore as docker got more stable.
Name Type Description id
string container id
cb
function called back after container was cleaned or maximum attempts were exceeded
- Source:
generated with docme
MIT