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 :

  • Docker container out of sync with host
  • How to view the docker image/container limit? And how to modify it while we run “docker build”?
  • Docker. npm install -> Error: getaddrinfo ENOTFOUND
  • Record Sound on Ubuntu Docker Image
  • Running Chromium inside Docker - Gtk: cannot open display: :0
  • Create a docker image/container from EC2 AMI
  • /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.

  • WSO2 API Manager response fails with APIMgtGoogleAnalyticsTrackingHandler error
  • Docker container has no TMPDIR environmental variable
  • docker stop spark container from exiting
  • Docker Push not able to push images to docker hub, it keep retrying
  • Test Docker cluster in Jenkins
  • Kubernetes container connection to RDS instance in separate VPC
  • 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.