github.com/openshift/docker-source-to-images@v1.2.0/docs/new_labels.md (about)

     1  # Adding New Labels
     2  New Docker Labels may be created and/or updated for the output image via the image metadata file.
     3  
     4  If a new label is specified in the metadata file, the label will be added in the output image.  However, any label previously defined in the base builder image will be ***overwritten*** in the output image, if the same label name is specified in the image metadata file.
     5  
     6  ## Image Metadata File Name and Path
     7  The name and path of the file ***must*** be the following:
     8  ```bash
     9  /tmp/.s2i/image_metadata.json
    10  ```
    11  
    12  ## Example 
    13  The file may have one or more label/value pairs.  Below is the JSON format of the labels, in the image metadata file:
    14  ```bash
    15  {
    16    "labels": [
    17      {"labelkey1":"value1"},
    18      {"labelkey2":"value2"},
    19      .........
    20    ]
    21  }
    22  
    23  ```
    24  Note: If the JSON format is different than shown above, it will cause an error.
    25  
    26  ## Creating the File
    27  The file should be created during the `assemble` step.