https://github.com/quobject/dockermachineconfig
A node.js wrapper for the docker-machine config command
https://github.com/quobject/dockermachineconfig
Last synced: 8 months ago
JSON representation
A node.js wrapper for the docker-machine config command
- Host: GitHub
- URL: https://github.com/quobject/dockermachineconfig
- Owner: Quobject
- License: apache-2.0
- Created: 2015-09-27T17:53:12.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-05T19:43:24.000Z (over 10 years ago)
- Last Synced: 2025-07-30T04:47:12.534Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 148 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dockermachineconfig
A node.js wrapper for the `docker-machine config` command
[](https://nodei.co/npm/dockermachineconfig/)
[](https://nodei.co/npm/dockermachineconfig/)
## Installation
### Step 1: Prerequisites
The docker-machine command line tool must be installed and accessible in the path
### Step 2: Installation
npm install dockermachineconfig
Then:
```js
var dockermachine = require('dockermachineconfig');
```
## Usage
With promise:
```js
dockermachine.config('machine.1.ap-southeast-2.1.0.0.4a').then( function (data) {
console.log('data =', data);
});
//data = {
// raw: '--tlsverify --tlscacert="/home/ubuntu/.docker/machine/machines/machine.1.ap-southeast-2.1.0.0.4a/ca.pem" --tlscert="/home/ubuntu/.docker/machine/machines/machine.1.ap-southeast-2.1.0.0.4a/cert.pem" --tlskey="/home/ubuntu/.docker/machine/machines/machine.1.ap-southeast-2.1.0.0.4a/key.pem" -H=tcp://52.64.155.4:2376',
// tlsverify: true,
// tlscacert: '/home/ubuntu/.docker/machine/machines/machine.1.ap-southeast-2.1.0.0.4a/ca.pem',
// tlscert: '/home/ubuntu/.docker/machine/machines/machine.1.ap-southeast-2.1.0.0.4a/cert.pem',
// tlskey: '/home/ubuntu/.docker/machine/machines/machine.1.ap-southeast-2.1.0.0.4a/key.pem',
// host: '52.64.155.4',
// port: '2376'
//}
```
With callback:
```js
dockermachine.config('machine.1.ap-southeast-2.1.0.0.4a', function(err, data) {
console.log('data =', data);
});
```