Build
This goal will build all images which have a <build>
configuration section. There must be a Containerfile
present in order to build a container image.
Building a container image without a Containerfile , thus purely on configuration is currently not supported.
|
Build Configuration
This section covers all the possible options for the <build>
tag.
Element | Description |
---|---|
noCache |
Do not use existing cached images for the container build. Build from the start with a new set of cached layers. Default value is: |
pull |
When the option is specified or set to “true”, pull the image. Raise an error if the image could not be pulled, even if the image is present locally. If the option is disabled (with –pull=false) or not specified, pull the image from the registry only if the image is not present locally. Raise an error if the image is not found in the registries and is not present locally. Default value is: See: https://docs.podman.io/en/latest/markdown/podman-build.1.html |
pullAlways |
Pull the image from the first registry it is found in as listed in registries.conf. Raise an error if not found in the registries, even if the image is present locally. Default value is: See: https://docs.podman.io/en/latest/markdown/podman-build.1.html |
tags |
An array consisting of one or more tags to attach to the built container image. Tags will be appended at the end of the image name. |
containerFile |
The name of the Default value is: |
containerFileDir |
Path of the directory where the Default value is: Project base directory |
A collection of labels to add to this image. They are specified in the typical maven property format. |
|
tagWithMavenProjectVersion |
When set to Default value is: |
createLatestTag |
Specifies whether the resultig container image should be tagged with Default value is: |
format |
Control the format for the built image’s manifest and configuration data. Supported values are:
Default value is: |
<configuration>
...
<images>
<image>
<name>your-image-name</name>
<build>
<pull>true</pull>
<pullAlways>false</pullAlways>
<tags>
<sampleTag>sampleTagValue</sampleTag>
</tags>
<createLatestTag>true</createLatestTag>
<format>OCI</format>
</build>
</image>
</images>
...
</configuration>
Batch Configuration
When using the <batch/>
configuration option, some configuration options are interpreted slightly different, compared to the explanation in the table above. The table below lists all these configuration options that are interpreted differently.
Element | Description |
---|---|
|
The directory in which all |