You need to have Docker installed. Download the native version of Docker for your platform here
All methods return a promise
Easy Docker
This is the quickest way to get up and running with docker.
Run a machine and a container
var easyDocker = require('fear-core-docker').easy;
easyDocker.machineGo()
.then(function() {
return easyDocker.containerGo('my docker image', 'my container name');
});
To remove the container you created
easyDocker.containerEnd();
If your container allows VNC
easyDocker.showVnc();
Specific operations
The docker, machine and vnc classes give you lower level control
var coreDocker = require('fear-core-docker').docker;
var dockerMachine = require('fear-core-docker').machine;
var dockerVnc = require('fear-core-docker').vnc;
dockerMachine.create('my machine name')
.then(function() {
return dockerMachine.start('my machine name');
});
var docker = new coreDocker('my machine name');
docker.ready()
.then(function() {
return docker.pull('my container image');
})
dockerVNC.open({host: global.dockerMachineIP['my ip identifier']});