dg man page

dg — templating system/generator for distributions

Synopsis

dg [-h] [--version] [--projectdir PROJECTDIR] [--distro DIST] [--multispec MULTISPEC] [--multispec-selector MULTISPEC_SELECTOR] [--spec SPEC] [--output OUTPUT] [--macros-from PROJECTDIR] [--container CONTAINER_TYPE] [--macro MACRO] [--max-passes PASSES] [--keep-block-whitespaces] (--template TEMPLATE | --multispec-combinations)

Description

Generate script using predefined metadata about distribution and
templates.

As an example of 'dg' usage, to generate _Dockerfile_ for Fedora
21 64-bit system, you may use command(s):

$ cd project/directory
$ dg --spec      docker-data.yaml      \
     --template  docker.tpl

Options

--version

show program's version number and exit

--projectdir PROJECTDIR

Directory with project (defaults to CWD)

--distro DIST

Use DIST distribution configuration.  Either that DIST.yaml needs to exist in the distgen installation, or it can be any file within PROJECTDIR (relative or absolute file name).

--multispec MULTISPEC

Use MULTISPEC yaml file to fill the TEMPLATE file

--multispec-selector MULTISPEC_SELECTOR

Selectors for the multispec file

--spec SPEC

Use SPEC yaml file to fill the TEMPLATE file

--output OUTPUT

Write result to OUTPUT file instead of stdout

--macros-from PROJECTDIR

Load variables from PROJECTDIR

--container CONTAINER_TYPE

Container type, e.g. 'docker'

--macro MACRO

Define distgen's macro

--max-passes PASSES

Maximum number of rendering passes, defaults to 32

--keep-block-whitespaces

Disable the jinja2 trim_blocks and lstrip_blocks options

--template TEMPLATE

Use TEMPLATE file, e.g. docker.tpl or a template string, e.g. "{{ config.docker.from }}"

--multispec-combinations

Print available multispec combinations

Authors

distgen was written by Pavel Raiskup (see AUTHORS) <praiskup@redhat.com>.

Distribution

The latest version of distgen may be downloaded from https://github.com/devexp-db/distgen

Info

Manual