Start a docker machine using JavaScript

I’m actually facing a problem to start my machine by my JavaScript. I can stop the running machines without any problems but I can’t start.

The error is the next one :

  • Enable Docker Remote API - raspberry pi / raspbian
  • Docker build failed because of “port 443: Connection timed out”
  • How can we collect performance metrics from CAdvisor docker container?
  • How do I create docker image from an existing CentOS?
  • What deletes docker images periodically?
  • How to update Docker image when there is new image version?
  • /Users/swisscom_NG/Desktop/mgmt-docker-gui/node_modules/docker-machine/index.js:79
    W20170106-13:19:51.164(1)? (STDERR)         done()
    W20170106-13:19:51.164(1)? (STDERR)         ^
    W20170106-13:19:51.165(1)? (STDERR)
    W20170106-13:19:51.165(1)? (STDERR) TypeError: done is not a function

    The code executed is :

    'machine.start': function(name){

    And Machine is defined like this:

    import Machine from 'docker-machine';

    The error is because it thinks that the machine is running but if I look into Docker I can see :
    enter image description here

    I’m using node-docker-machine

    Thank you for your help.

  • Docker command can't connect docker daemon using Hypriot Docker
  • Can I control the owner of a bind-mounted volume in a docker image?
  • Nginx docker (13: Permission denied) while logging request to mounted volume
  • AWS Elastic Beanstalk with single container docker: Logging parameter in
  • Cannot pull same image after aborting Docker pull once: Layer already being pulled by another client. Waiting
  • Docker upgrades failing due to conflicts
  • One Solution collect form web for “Start a docker machine using JavaScript”

    If you check the documentation of docker-machine you need to pass a done function to get the callback when docker-machine finish the start event. so just change your code as this:

    Machine.start(name, function(){ console.log('Docker Started') });
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.