Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/netbek/jinja2-docker
https://github.com/netbek/jinja2-docker
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/netbek/jinja2-docker
- Owner: netbek
- License: agpl-3.0
- Created: 2024-01-02T12:46:25.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-03T05:30:18.000Z (about 1 year ago)
- Last Synced: 2024-10-15T08:48:44.272Z (3 months ago)
- Language: Python
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jinja2-docker
## Usage
```shell
docker run --rm -v TEMPLATES_DIR:/templates -e TEMPLATE=TEMPLATE_FILE ghcr.io/netbek/jinja2-docker:latest [CONTEXT]
```## Examples
Clone the repository to view examples.
1. Render a template without context:
```shell
docker run --rm -v ./examples:/templates -e TEMPLATE=no_context.jinja2 ghcr.io/netbek/jinja2-docker:latest
```2. Render a template with context:
```shell
docker run --rm -v ./examples:/templates -e TEMPLATE=context.jinja2 ghcr.io/netbek/jinja2-docker:latest "fruit=pineapple" "veg=broccoli"
```3. Render a template and format with Prettier:
```shell
docker run --rm -v ./examples:/templates -e TEMPLATE=file.yml.jinja2 -e PRETTY=1 -e PRETTIER_PARSER=yaml ghcr.io/netbek/jinja2-docker:latest "fruit=pineapple" "veg=broccoli"
```## License
Copyright (c) 2023 Hein Bekker. Licensed under the GNU Affero General Public License, version 3.