Images tree

Add your images definition into Stevedore’s images-tree and create a relationship among them

The images-tree is a map of maps data structure that contains the definitions of the images, as well as the relationships between them. It follows the following rules:

  1. You define the images-tree in YAML structure. Stevedore looks for the images-tree in the file specified on the tree_path configuration parameter.
  2. The main key containing the tree definition is named images_tree. The value is a map of maps data structure.
  3. You place all the image names that belong to the images-tree under “images_tree” block. Each image’s name is a first-level key.
  4. You place the second-level keys under each image name key to identify the image versions.
  5. You define the image version’s value as the image definition for that specific version.
  6. Images can be related to each other, and these relationships are defined using the parent name and version in the image definition.
  7. Images in the images-tree can be built using Stevedore’s build command, which will build the image and any of its descendants.

In case an image name or image version contains a . (dot), you must quote it to avoid the YAML parser to fails.

Example

The following example specifies an images-tree that provides multiple image definitions for the ubuntu, php-fpm, and php-cli images. The ubuntu image has two versions defined, 18.04 and 20.04, each with its image definition. The value of these versions is the image definition for each one of them.

Please note that if an image name or version contains a . (dot), it should be enclosed in quotes to prevent the YAML parser from failing.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
images_tree:
  ubuntu:
    "18.04":
      builder: global-infr-builder
      children:
      - php-fpm:
        - "8.0"
    "20.04":
      builder: global-infr-builder
      children:
      - php-fpm:
        - "8.1"
      - php-cli:
        - "8.1"
  php-fpm:
    "8.0":
      builder:
        driver: docker
        context:
          path: php-fpm
        vars:
          version: "{{ .Version }}"
    "8.1":
      builder:
        driver: docker
        context:
          path: php-fpm
        vars:
          version: "{{ .Version }}"
  php-cli:
    "8.1":
      builder:
        driver: docker
        context:
          path: php-fpm
        vars:
          version: "{{ .Version }}"
Last modified March 26, 2023: change header image (ef70c3b)