1.2.3 • Published 7 years ago

dbuilder v1.2.3

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

Programatically build docker container Build Status Coverage Status

Use-case

When you need to programatically build, create (stop and remove it if duplicate container already exist), attach and start container -

Usage

new DBuilder({
  name: 'cool-one', // Will be used at build and when runned
  port: 3306, // Host port
  exposed: 5432, // Container port, that need to correlate with the one in Dockerfile
  envs: { test: 1 }, // Environment variable which will be used when container is started
  image: 'path' // Path to docker file
}).up(() => {
  console.log('done and done');
});

Listen to events

let builder = new DBuilder(...);
builder.on('complete', () => {});
builder.on('download', () => {});
builder.on('run', () => {});
builder.on('stopped and removed', () => {});
builder.on('error', error => {});
builder.on('data', data => {});
builder.up(() => ...);

Run tests

In order to run tests you should have installed and running docker.

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago