Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fear-core-docker

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fear-core-docker

FEAR core docker tasks

  • 2.0.0-0
  • beta
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

Docker

You need to have Docker installed. Download the native version of Docker for your platform here

If you have Docker Toolbox installed then it is best to uninstall it before install Docker native.

Module

To install the module

$ npm i fear-core-docker

Usage

Docker compose

DockerCompose take 3 parameters:

ParamDescriptionRequired
{string} filePathThe path to the docker compose fileYes
{string} projectNameThe name of the compose projectNo
{string} hostThe host docker machineNo
var compose = new DockerCompose(path.join(__dirname, './selenium/selenium-grid.yml'));

compose.scale('chrome=3', 'firefox=3')
    .then(function() {
        return compose.up();
    })
    .then(function() {
        return compose.stop();
    })
    .then(function() {
        return compose.rm();
    });

See Docker Compose CLI for reference. Not all commands have been implemented.

Deprecated - VirtualBox (Docker Toolbox)

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']});

Further reading

FAQs

Package last updated on 14 Sep 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