Socket
Book a DemoInstallSign in
Socket

docker-build

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docker-build

docker build as a duplex stream

latest
Source
npmnpm
Version
2.2.0
Version published
Maintainers
1
Created
Source

docker-build

Docker build as a duplex stream. Pipe in a tar stream and pipe out the build output

npm install docker-build

build status

Usage

var build = require('docker-build')
var fs = require('fs')

fs.createReadStream('a-tar-file-with-a-dockerfile.tar')
  .pipe(build('my-new-image'))
  .pipe(process.stdout)

The above example will build a docker image from the input tarball and pipe the build output to stdout using docker running locally on port 2375.

API

var stream = build(tag, [options])

options can contain the following:

{
  host: '/var/run/docker.sock', // host to docker
  cache: true, // whether or not to use docker fs cache (defaults to true)
  quiet: false, // be quiet - defaults to false,
  registry: conf, // add a registry config
  remove: true, // automatically removes intermediate contaners (defaults to true)
  forceremove: false // always remove intermediate containers, even if the build fails (defaults to false)
}

CLI

There is a command line too available as well

$ npm install -g docker-build
$ docker-build --help

Running docker-build some-image-tag will build current working directory

License

MIT

Keywords

docker

FAQs

Package last updated on 04 Nov 2014

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