Images tree
The images-tree is a data structure that contains the definitions of the images, as well as the relationships between them. It is defined in a YAML format containing a main key named images
, which is a map of maps data structure.
Under the images
block, you place all the image names, and each image’s name is a first-level key. For each image name, you have to define a second level of keys that identifies the image versions. The value of each version is the image definition for that specific name and version.
Note that in case an image name or image version contains a .
(dot), you must quote it to avoid the YAML parser failing. This is a common issue that can be easily solved by wrapping the name or version in quotes.
Images can be related to each other, and these relationships are defined using their name and version. The relationships can be established from the image to its parents or its children. The images reference guide provides more information about how to set the images’ relationship.
To know which images can be built, Stevedore searches for the images-tree in the file specified on the images_tree configuration parameter, or in a directory specified by the same parameter. In the latter case, Stevedore loads the image definitions found within all the files in the directory.
Example
The following example specifies an images-tree that provides multiple image definitions for the busybox, php-fpm, php-cli and my-app images.
|
|
You can check the previously defined images-tree by executing stevedore get images --tree
.
|
|