docker-utility
v1.0.1
Published
Docker utility methods for node.js
Downloads
9
Maintainers
Readme
#Docker Utility Module
Install
npm install docker-utility --save;
Initiate
var path, result;
result = {
host: url_parse(process.env.DOCKER_HOST || 'unix:///var/run/docker.sock'),
port: process.env.DOCKER_PORT
};
if (process.env.DOCKER_TLS_VERIFY !== '' && (process.env.DOCKER_CERT_PATH != null)) {
path = process.env.DOCKER_CERT_PATH;
result.ca = fs.readFileSync("" + path + "/ca.pem");
result.cert = fs.readFileSync("" + path + "/cert.pem");
result.key = fs.readFileSync("" + path + "/key.pem");
result.https = {
cert: result.cert,
key: result.key,
ca: result.ca
};
}
var DockerUtility = require("DockerUtility");
var dockerUtility = new DockerUtility(result);
Follow me on Twitter @notmilobejda and on Github. github.com/mbejda