Assets

In this topic, we are talking about, how to add additional assets to your build context.
So these are all kinds of things that are used with either COPY or ADD within your Dockerfile.
Because for this, these files need to be available in the generated tag folders.


Static assets

If you want to add a static assets for a single tag, then you can just place that filer, or even folder in the variants folder.
So this can be either e.g. a README.md or a full list of files within a configuration folder.

All these files and directories will be copied to the target tag folder.
Please don't forget to use these files in your Dockerfile, if necessary.



Shared assets

If you want to provide global assets for all images and tags, you can create any folder and set that as the shared assets folder in your manifest.json file.
When you now generate your files with Orca, not only the files from the variants folders will be used for the copy process, but also all files from the shared assets folder.

This is a great thing for global files that should be available in all images and tags.

Please note, if an image doesn't use it e..g with COPY in the Dockerfile, the file will exist, but will not be used when building that image.


Dynamic assets

Let's imagine you want to create a tag specific README.md file, but you want to use a global template for it, to avoid duplicate texts.

You can of course use separate README.md.twig files in all variants and adjust it individually.
But what if only a few things are different?!
In that case you can create a README.md.twig file in a shared assets folder and simply use variables in that file, such as the Orca prebuilt variables.
Here's an example for a single README.md that will be automatically added to all tags but still has image specific text in it - and you can even decide to overwrite a block in a specific tag: