dockerignore v0.2.0
dockerignore 
Command line tool for creating or updating a .dockerignore file based on .gitignore.
Install globally with npm:
npm i -g dockerignoreUsage
Say .gitignore has:
node_modules
test/actualAnd you want .dockerignore to have:
node_modules
test/actual
test/fixturesIn the command line run:
dockerignore "test/fixtures"An .dockerignore file will be created, or updated:
node_modules
test/actual
# dockerignore
test/fixturesHeads up!
The # dockerignore comment is used to ensure that .dockerignore reflects the latest changes in your .gitignore file, just by running dockerignore in the command line.
_If you want to preserve everything in your .dockerignore file, regardless of what is in .gitignore, just add the # dockerignore comment at the top of the .dockerignore file.
CLI commands
-i|--ignore: comma-separated list of patterns to add to.dockerignore-u|--unignore: comma-separated list of patterns to remove from.dockerignore. This will not un-ignore patterns in.gitignore.-D|--dest: optionally define a different destination filepath. Good for test driving to see what will be generated in advance.-g|--gitignore: alternate source filepath for.gitignore.-d|--dockerignore: alternate source filepath for.dockerignore.
API
To use via API, first:
npm i dockerignore --saveThen:
var dockerignore = require('dockerignore');
dockerignore(dock, git, options);Params
dock{String|Array}: String from.dockerignoreor an array of patterns to use.git{String|Array}: String from.gitignoreor an array of patterns to use.options{Object}ignoreArray of patterns to add to the existing patterns from.gitignoreunignoreArray of patterns to remove from.dockerignore. This will not un-ignore patterns in.gitignore
Run tests
Install dev dependencies.
npm i -d && npm testContributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Maintainer
James Talmage
Author of npmignore (of which this is a fork)
Jon Schlinkert
License
Original npmignore utility Copyright (c) 2015 Jon Schlinkert
Released under the MIT license
This file was generated by verb-cli on March 17, 2015.
10 years ago