Skip to content

Generate an equivalent `.dockerignore` file from an existing `.gitignore` file

Notifications You must be signed in to change notification settings

oncarrot/gitignore-to-dockerignore

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gitignore → Dockerignore

Generate an equivalent .dockerignore file from an existing .gitignore file.

Installation

npm install --save gitignore-to-dockerignore

Usage

API

const gitignoreToDockerignore = require('gitignore-to-dockerignore')

const input = `
/node_modules/
*.log
`

console.log(gitignoreToDockerignore(input))
// .git/
// node_modules/
// **/*.log

CLI

# Write a .dockerignore file from .gitignore
gitignore-to-dockerignore

About

Generate an equivalent `.dockerignore` file from an existing `.gitignore` file

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%