Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 3. Build strategies
You can use a curated set of build strategies or cluster build strategies on the OpenShift Container Platform cluster. The Builds for Red Hat OpenShift Operator automatically installs these strategies for use. This automated installation of strategies helps you to quickly get started with Builds.
Builds supports the following cluster build strategies:
-
buildah
: Supported on all platforms -
source-to-image
: Supported on the linux/amd64 platform
The buildpacks
build strategy is a Developer Preview feature only. Developer Preview features are not supported by Red Hat in any way and are not functionally complete or production-ready. Do not use Developer Preview features for production or business-critical workloads. Developer Preview features provide early access to upcoming product features in advance of their possible inclusion in a Red Hat product offering, enabling customers to test functionality and provide feedback during the development process. These features might not have any documentation, are subject to change or removal at any time, and testing is limited. Red Hat might provide ways to submit feedback on Developer Preview features without an associated SLA.
3.1. Buildah Copier lienLien copié sur presse-papiers!
The buildah
cluster build strategy uses a Dockerfile to build a container image and pushes it to the target registry. You must specify the Dockerfile in the spec.paramValues
field of the Build
CR.
You can share the buildah
strategy across different namespaces within your cluster because the Builds for Red Hat OpenShift Operator installs the buildah
strategy at cluster level.
You can configure the following parameters for the buildah
strategy:
Name | Type | Description | Default |
---|---|---|---|
| array | Key-value pair of the arguments required by the Dockerfile that is used during the build | [] |
| array | List of registries that must be blocked | [] |
| array | List of insecure registries with their fully qualified domain name (FQDN) | [] |
| array | List of registries to search short name images | ["registry.redhat.io", "quay.io"] |
| string | Path of the Dockerfile that is used during the build | "Dockerfile" |
| string |
Storage drivers that are used by | "vfs" |
For more information, see Configuring build strategies in the Additional resources section.
3.2. Source-to-image Copier lienLien copié sur presse-papiers!
This build strategy is composed of source-to-image
and buildah
. You can use this strategy to generate a container file and prepare the application to build with a builder image. You must specify the builder image in the spec.paramValues
field of the Build
CR.
You can share the source-to-image
strategy across different namespaces within your cluster because the Builds for Red Hat OpenShift Operator installs the source-to-image
strategy at cluster level.
You can configure the following parameters for the source-to-image
strategy:
Name | Type | Description | Default |
---|---|---|---|
| array | List of registries that must be blocked | [] |
| array | List of insecure registries with their FQDN | [] |
| array | List of registries to search short name images | ["registry.redhat.io", "quay.io"] |
| string | Location of the builder image that is used during the build | NA |
| string |
Storage drivers that are used by | "vfs" |