Variables

Building dynamic content

If you don't want to have different versions of files, you can simply use variables whenever you want to.

Variables can be defined completely flexible either on variant level, global level or both.


Variant Variables

Add a variables.json file in your variant folder and simply add any json content like this:


Now simply use that Twig variable within your Dockerfile when executing the download script of your app.


Global Variables

If you want to share variables across all images and tags, simply create a json file, assign that as shared_variables in your manifest.json and use it.

All these global variables will also be merged with variant variables, so you're really flexible in this case too.


Unknown Variables

We have good news!
Twig does automatically throw errors if certain variables haven't been found.
So if you have some bugs in your Orca project with wrong variables, you will immediately see it when generating your files.


Orca Variables

Orca does already come with some integrated variables that you can use in your Twig files
Here is an overview:

  • orca.image
    the name of the current image

  • orca.tag
    the name of the current tag

  • orca.generate_date
    the date when the image is being generated by Orca