Skip to content

Instantly share code, notes, and snippets.

@retrohacker
Last active August 29, 2015 14:02
Show Gist options
  • Select an option

  • Save retrohacker/54b4c2af840a07ce1426 to your computer and use it in GitHub Desktop.

Select an option

Save retrohacker/54b4c2af840a07ce1426 to your computer and use it in GitHub Desktop.
var tar = require('tar')
var fstream = require('fstream')
function buildTar() {
var converter = tar.Pack()
var tarball = fstream.
Writer({path:"./docker.tar",mode:755})
converter.pipe(tarball)
fstream
.Reader("./")
.pipe(converter)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment