Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theden/dockerignore-generate
Automatically generate dockerignore files
https://github.com/theden/dockerignore-generate
docker dockerignore python3
Last synced: 4 days ago
JSON representation
Automatically generate dockerignore files
- Host: GitHub
- URL: https://github.com/theden/dockerignore-generate
- Owner: TheDen
- License: gpl-2.0
- Created: 2018-08-07T13:42:48.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-15T17:29:07.000Z (4 months ago)
- Last Synced: 2024-08-10T09:58:24.790Z (3 months ago)
- Topics: docker, dockerignore, python3
- Language: Python
- Homepage: https://pypi.org/project/dockerignore-generate/
- Size: 16.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.txt
- License: LICENSE
Awesome Lists containing this project
README
# dockerignore-generate
Python (`>=3.6`) cli tool to automatically generate `.dockerignore` files
## Install
```bash
pip install dockerignore-generate
```## Usage
In a directory with a `Dockerfile`
```bash
dockerignore-generate
```will print out the contents of the generated `.dockerignore` file. Without arguments the docker build context is assumed to be the curret working directory.
### Contexts and Dockerfiles
To speciify a specific context use the `-c` flag, and `-f` to speciify a `Dockerfile`, e.g.,
```bash
dockerignore-generate -f Dockerfile.custom -c ../
```To save a the `.dockerignore` file, use the `-s` flag, and `-o` to overwrite an existing file (file will be stored in the docker build context)
```bash
dockerignore-generate -f Dockerfile.custom -c ../ -s
wrote ../.dockerignore
```