3.2. カスタムレジストリーイメージのビルド
本セクションでは、カスタム devfile およびプラグインレジストリーイメージを含むイメージをビルドする方法を説明します。この手順では、新規の devfile およびプラグインを追加する方法を説明します。devfile レジストリーイメージには、devfile で参照されるすべてのサンプルプロジェクトが含まれます。プラグインレジストリーイメージには、プラグインまたは拡張機能のメタデータが含まれます。
手順
devfile レジストリーリポジトリーのクローンを作成し、デプロイするバージョンをチェックアウトします。
git clone git@github.com:redhat-developer/codeready-workspaces.git cd codeready-workspaces git checkout crw-2.5-rhel-8
$ git clone git@github.com:redhat-developer/codeready-workspaces.git $ cd codeready-workspaces $ git checkout crw-2.5-rhel-8Copy to Clipboard Copied! Toggle word wrap Toggle overflow ./dependencies/che-devfile-registry/devfiles/ディレクトリーで、サブディレクトリー<devfile-name>/を作成し、devfile.yamlファイルおよびmeta.yamlファイルを追加します。devfile のファイル編成
./dependencies/che-devfile-registry/devfiles/ └── <devfile-name> ├── devfile.yaml └── meta.yaml./dependencies/che-devfile-registry/devfiles/ └── <devfile-name> ├── devfile.yaml └── meta.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
devfile.yamlファイルに有効なコンテンツを追加します。devfile 形式の詳細については、https://access.redhat.com/documentation/en-us/red_hat_codeready_workspaces/2.5/html-single/end-user_guide/index#making-a-workspace-portable-using-a-devfile_crw を参照してください。 meta.yamlファイルが以下の構造に準拠していることを確認します。Expand 表3.1 devfile meta.yaml のパラメーター 属性 詳細 descriptionユーザーダッシュボードに表示される説明。
displayNameユーザーダッシュボードに表示される名前。
globalMemoryLimitdevfile が起動するすべてのコンポーネントによって消費されることが予想されるメモリーの合計。この数字はユーザーダッシュボードに表示されます。これは情報を示唆するように提供されますが、CodeReady Workspaces サーバーでは考慮されません。
iconユーザーダッシュボードに表示される
.svgファイルへのリンクtagsタグの一覧。タグには通常、スタックに含まれるツールが含まれます。
例3.1 devfile の例
meta.yamldisplayName: Rust description: Rust Stack with Rust 1.39 tags: ["Rust"] icon: https://www.eclipse.org/che/images/logo-eclipseche.svg globalMemoryLimit: 1686Mi
displayName: Rust description: Rust Stack with Rust 1.39 tags: ["Rust"] icon: https://www.eclipse.org/che/images/logo-eclipseche.svg globalMemoryLimit: 1686MiCopy to Clipboard Copied! Toggle word wrap Toggle overflow ./dependencies/che-devfile-registry/devfiles/ディレクトリーで、サブディレクトリー<devfile-name>/を作成し、devfile.yamlファイルおよびmeta.yamlファイルを追加します。devfile のファイル編成
./dependencies/che-devfile-registry/devfiles/ └── <devfile-name> ├── devfile.yaml └── meta.yaml./dependencies/che-devfile-registry/devfiles/ └── <devfile-name> ├── devfile.yaml └── meta.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
devfile.yamlファイルに有効なコンテンツを追加します。devfile 形式の詳細については、https://access.redhat.com/documentation/en-us/red_hat_codeready_workspaces/2.5/html-single/end-user_guide/index#making-a-workspace-portable-using-a-devfile_crw を参照してください。 meta.yamlファイルが以下の構造に準拠していることを確認します。Expand 表3.2 devfile meta.yaml のパラメーター 属性 詳細 descriptionユーザーダッシュボードに表示される説明。
displayNameユーザーダッシュボードに表示される名前。
globalMemoryLimitdevfile が起動するすべてのコンポーネントによって消費されることが予想されるメモリーの合計。この数字はユーザーダッシュボードに表示されます。これは情報を示唆するように提供されますが、CodeReady Workspaces サーバーでは考慮されません。
iconユーザーダッシュボードに表示される
.svgファイルへのリンクtagsタグの一覧。タグには通常、スタックに含まれるツールが含まれます。
例3.2 devfile の例
meta.yamldisplayName: Rust description: Rust Stack with Rust 1.39 tags: ["Rust"] icon: https://www.eclipse.org/che/images/logo-eclipseche.svg globalMemoryLimit: 1686Mi
displayName: Rust description: Rust Stack with Rust 1.39 tags: ["Rust"] icon: https://www.eclipse.org/che/images/logo-eclipseche.svg globalMemoryLimit: 1686MiCopy to Clipboard Copied! Toggle word wrap Toggle overflow カスタム devfile レジストリーイメージをビルドします。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ヒントbuild.shスクリプトの詳細なオプションを表示するには--helpパラメーターを使用します。レジストリーイメージにプラグインバイナリーを含めるには、
--offlineパラメーターを追加します。