New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

docker-machine

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docker-machine

Programmatic API to Docker Machine

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.8K
decreased by-33.98%
Maintainers
1
Weekly downloads
 
Created
Source

docker-machine

Programmatic API to Docker Machine (0.6.0+).

node npm status Dependency status

example

node example.js ls /

const Machine = require('docker-machine')
const cmd = process.argv.slice(2)

if (!cmd.length) {
  throw new TypeError('Requires a command to run')
}

const machine = new Machine

// Start if not already started
machine.start(function (err) {
  if (err) throw err

  // Execute a command
  machine.ssh(cmd, (err, result) => {
    if (err) throw err
    console.log(result)
  })
})

new Machine([name || opts])

Options:

  • name: defaults to DOCKER_MACHINE_NAME or "default"

machine.status((err, status) => ..)

Get lowercased status of machine.

machine.isRunning((err, running) => ..)

True if status is running.

machine.start(err => ..)

Start machine, if not already running.

machine.env([opts], (err, result) => ..)

Options:

  • json: if true, result will be an object
  • shell: custom shell. Ignored if json is true.

machine.ssh(command, (err, result) => ..)

Run a command via SSH.

install

With npm do:

npm install docker-machine

license

MIT © Vincent Weevers

Keywords

FAQs

Package last updated on 13 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc