このコンテンツは選択した言語では利用できません。

Chapter 6. Custom Builder


6.1. Overview

Custom build is designed to fill the gap that was created when everybody jumped into creating Docker images. Still there is a requirement to produce individual artifacts (packages, jars, wars, installable zips, base images etc.) This is where Custom build is the perfect match to fill in that gap. Additionally Custom build allows implementing any extended build process for example, CI/CD flow that runs unit or integration tests. The limit here is just the imagination of the custom builder image author.

To fully utilize the power of Custom build one needs to be understand how to create a builder image that will be capable of building desired objects.

6.2. Custom Builder Image

The builder image upon invocation receives following environment variables with the information needed to proceed with the build:

Table 6.1. Custom Builder Environment Variables
Variable nameDescription

BUILD

This variable specifies the entire serialized Build object.

SOURCE_REPOSITORY

This variable specifies the URL to a repository with sources to build.

DOCKER_SOCKET

This variable specifies the path to the Docker socket, if exposing the Docker socket was enabled on BuildConfig.

6.3. Custom Builder Workflow

Although the custom builder image author has a great flexibility in defining the build process on its own, still they should follow a few required steps necessary to seamlessly run a build inside of OpenShift Enterprise. The required steps for a custom builder image are following:

  1. Read the Build definition, which contains all the necessary information about input parameters for the build.
  2. Run the build process.
  3. If your build produces image, push it to the Build's output location if the output location is defined. Other output locations can be passed with environment variable for now.
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.