Image
Define the Docker images you want to build
Stevedore represents a Docker image by an image definition, therefore an image holds the details required to build a Docker image. Note that an image by itself has no sense, it must be defined within the images-tree.
Keywords reference
That section conveys the description of the attributes that you can use to define an image.
Keyword | Type | Description | Value |
---|---|---|---|
builder | string/map | Identifies the builder to use to create the image. You can define it as a string when you want to refer to a global-builder. To designate it such an in-line builder, you have to define it as a yaml data-structure. In the builder’s reference guide you have the details to define it. If the builder attribute is not defined, it is used a builder which does not perform actions. optional | - |
children | map | Contains references to descendant images which uses the current image as parent. optional | It is a map where each key refers to an image name within the images-tree and the value is a list of image versions. Example: children: |
name | string | It is the image name. optional | By default its value is defined as the images-tree’s image name key |
namespace | string | It is the Docker`s registry namespace. optional | - |
parents | map | Contains the references to the parent images from which the current image can be built. optional | It is a map that provides a reference to the parent images within the images-tree. Each key identifies the parent name and the value is a list of versions. Example: parents: |
persistent_vars | list(map) | You define there a list of variables required to build the Docker image. That variables are inherit by the children images. optional | Its value is a key-value data-structure where each key is an string and its value a yaml data-structure. Example: persistent_vars: |
registry | string | It is the Docker’s registry host. optional | - |
tags | list(string) | You define a list of additional tags to generate. optional | - |
vars | list(map) | You define there a list of variables required to build the Docker image. optional | Its value is a key-value structure where each key is an string and its value a yaml data-structure. Example: vars: |
version | string | It is the Docker’s image tag. optional | By default its value is defined as the images-tree’s image version key |
persistent_labels | list(map) | It is a key-value metadata pair that provides descriptive information about the image. That variables are inherit by the children images. optional | Its value is a key-value structure where each key is an string and its value a yaml data-structure. Example: persistent_labels: |
labels | list(map) | It is a key-value metadata pair that provides descriptive information about the image. optional | Its value is a key-value structure where each key is an string and its value a yaml data-structure. Example: labels: |
Templating image attributes
An image definition allows you to define the values of its attributes as a Golang text template. To achieve that, Stevedore provides you with the following template variables.
Name | Variable | Description |
---|---|---|
name | Name | It provides the image’s name within the images-tree |
version | Version | It provides the image’s version within the images-tree |
parent | Parent | It let you to achieve the templating image attributes from the parent image. You can access, example to {{ .Parent.Name }} attribute. |
date RFC3339 | DateRFC3339 | It stores a date and time value in a string format that conforms to the RFC 3339 standard. The format includes the year, month, day, hour, minute, and second components, and optionally the fraction of a second and the time zone offset. |
date RFC3339 Nano | DateRFC3339Nano | It refers to a date/time value formatted according to the RFC3339Nano specification, which includes nanosecond precision. This specification defines a standard format for representing dates and times in machine-readable formats, using the ISO 8601 standard. |
Image definition example
The following example is provided for illustrative purposes only and should not be copied and pasted into your configuration.
|
|
Last modified April 24, 2023: create docs-v0.11 (331b058)