forked from Soulou/docker.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
34 lines (34 loc) · 5.86 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
"name": "docker.io",
"version": "0.6.3",
"description": "wrapper for the docker.io REST interface",
"main": "./lib",
"scripts": {
"test": "./node_modules/mocha/bin/mocha -R tap tests.js"
},
"repository": {
"type": "git",
"url": "git://github.com/appersonlabs/docker.io.git"
},
"keywords": [
"docker",
"docker.io"
],
"author": {
"name": "Matt Apperson"
},
"license": "Apache 2",
"readmeFilename": "README.md",
"dependencies": {
"querystring": "*",
"follow-redirects": "*",
"flat-validator": "git://github.com/appersonlabs/flat-validator.git"
},
"devDependencies": {
"chai": "~1.8.0",
"mocha": "~1.13.0"
},
"readme": "docker.io\n=========\n\nNode.JS wrapper for low-level Docker.io HTTP interface\n\n## Usage\n\n```javascript\n\nvar docker = require('docker.js')({host:\"http://localhost\", port: \"4243\", version:'v1.1'});\n\n// Note, the options for host, port and version are all optional. The values passed\n// in this example are the defaults\n\n```\n\nWe have implamented most of the container methods like:\n\n- list\n\n```javascript\n\nfunction handler(err, res) {\n if (err) throw err;\n console.log(\"data returned from Docker as JS object: \", res);\n}\n\nvar options = {}; // all options listed in the REST documentation for Docker are supported.\n\ndocker.containers.list(options, handler);\n// OR\ndocker.containers.list(handler);\n\n```\n\n- create\n\n```javascript\n\nfunction handler(err, res) {\n if (err) throw err;\n console.log(\"data returned from Docker as JS object: \", res);\n}\n\nvar options = {}; // all options listed in the REST documentation for Docker are supported.\n\ndocker.containers.create(options, handler);\n// OR\ndocker.containers.create(handler);\n\n```\n\n- inspect\n\n```javascript\n\nfunction handler(err, res) {\n if (err) throw err;\n console.log(\"data returned from Docker as JS object: \", res);\n}\n\nvar options = {}; // all options listed in the REST documentation for Docker are supported.\n\ndocker.containers.inspect('263tbr762t37rtbd', options, handler);\n// OR\ndocker.containers.inspect('263tbr762t37rtbd', handler);\n\n\n```\n\n- inspectChanges\n\n```javascript\n\nfunction handler(err, res) {\n if (err) throw err;\n console.log(\"data returned from Docker as JS object: \", res);\n}\n\nvar options = {}; // all options listed in the REST documentation for Docker are supported.\n\ndocker.containers.inspectChanges('263tbr762t37rtbd', options, handler);\n// OR\ndocker.containers.inspectChanges('263tbr762t37rtbd', handler);\n\n```\n\n- runExport\n\n```javascript\n\nfunction handler(err, res) {\n if (err) throw err;\n console.log(\"data returned from Docker as JS object: \", res);\n}\n\nvar options = {}; // all options listed in the REST documentation for Docker are supported.\n\ndocker.containers.runExport('263tbr762t37rtbd', options, handler);\n// OR\ndocker.containers.runExport('263tbr762t37rtbd', handler);\n```\n\n- start\n\n```javascript\n\nfunction handler(err, res) {\n if (err) throw err;\n console.log(\"data returned from Docker as JS object: \", res);\n}\n\nvar options = {}; // all options listed in the REST documentation for Docker are supported.\n\ndocker.containers.start('263tbr762t37rtbd', options, handler);\n// OR\ndocker.containers.start('263tbr762t37rtbd', handler);\n```\n\n- stop\n\n```javascript\n\nfunction handler(err, res) {\n if (err) throw err;\n console.log(\"data returned from Docker as JS object: \", res);\n}\n\nvar options = {}; // all options listed in the REST documentation for Docker are supported.\n\ndocker.containers.stop('263tbr762t37rtbd', options, handler);\n// OR\ndocker.containers.stop('263tbr762t37rtbd', handler);\n```\n\n- restart\n\n```javascript\n\nfunction handler(err, res) {\n if (err) throw err;\n console.log(\"data returned from Docker as JS object: \", res);\n}\n\nvar options = {}; // all options listed in the REST documentation for Docker are supported.\n\ndocker.containers.restart('263tbr762t37rtbd', options, handler);\n// OR\ndocker.containers.restart('263tbr762t37rtbd', handler);\n```\n\n- attach\n\n```javascript\n\n// This gets fired on every line returned by the container for stderr, stdin, & stdout. It gets called once for logs\nfunction handler(err, res) {\n if (err) throw err;\n console.log(\"data returned from Docker as JS object: \", res);\n}\n\nvar options = {}; // all options listed in the REST documentation for Docker are supported.\n\ndocker.containers.attach('263tbr762t37rtbd', options, handler);\n// OR\ndocker.containers.attach('263tbr762t37rtbd', handler);\n```\n\n- wait\n\n```javascript\n\n// This fires once the container stops\nfunction handler(err, res) {\n if (err) throw err;\n console.log(\"data returned from Docker as JS object: \", res);\n}\n\nvar options = {}; // all options listed in the REST documentation for Docker are supported.\n\ndocker.containers.wait('263tbr762t37rtbd', options, handler);\n// OR\ndocker.containers.wait('263tbr762t37rtbd', handler);\n```\n\n- runExport\n\n```javascript\n\nfunction handler(err, res) {\n if (err) throw err;\n console.log(\"data returned from Docker as JS object: \", res);\n}\n\nvar options = {}; // all options listed in the REST documentation for Docker are supported.\n\ndocker.containers.runExport('263tbr762t37rtbd', options, handler);\n// OR\ndocker.containers.runExport('263tbr762t37rtbd', handler);\n```\n\n- version\n\n```javascript\n\nfunction handler(err, res) {\n if (err) throw err;\n console.log(\"data returned from Docker as JS object: \", res);\n}\n\ndocker.version(handler);\n```\n\n- info\n\n```javascript\n\nfunction handler(err, res) {\n if (err) throw err;\n console.log(\"data returned from Docker as JS object: \", res);\n}\n\ndocker.info(handler);\n```\n\nOther methods are implamented but a little buggy... PULL REQUESTS ARE WELCOME!",
"_id": "[email protected]",
"_from": "docker.io@*"
}