Stream tarballs directly from GitHub to docker without touching the file system.
MIT License
Stream tarballs directly from GitHub to docker without touching the file system.
$ npm i github-to-docker -S
Build latest master branch of ipfs/go-ipfs
with default tag
set to 'ipfs/go-ipfs:master'
and send docker build output to stdout
.
// ipfs.js
require('github-to-docker')('ipfs/go-ipfs').pipe(process.stdout)
$ node ipfs.js
$ npm i github-to-docker -g
$ github-to-docker ipfs/go-ipfs
Step 1 : FROM alpine:3.3
---> d7a513a663c1
Step 2 : MAINTAINER Lars Gierth <[email protected]>
---> Using cache
---> f6eaf10d37c6
$ github-to-docker --help
Usage: github-to-docker repo [options]
--ref, git ref (default: master)
--tag tag for the resulting docker image
--version, -v
var build = require('github-to-docker')(repo|opts)
Returns a readable stream which is the build output from docker. Parameter can either be a string or an object. Use the string version to build an open source repo.
Options takes the following properties:
{
github: {}, // used by 'github-archive-stream'
docker: {} // used by 'docker-build'
}
For private repositories you need to provide authentication, see github-archive-stream
.
For default docker values, see docker-build
.
If opts.docker.tag
is not set, it will default to repo:ref
.
MIT