5.7.4. IntelliJ Platform をベースにした IDE のイメージのビルド
本セクションでは、IntelliJ Platform バージョン 20203 をベースにした IDE のイメージをビルドする方法を説明します。
5.7.4.1. IntelliJ IDEA Community または PyCharm Community のイメージのビルド
この手順では、IntelliJ IDEA Community または PyCharm Community のイメージをビルドする方法を説明します。
前提条件
- ビルドホストには、少なくとも 2 GB の使用可能な RAM があります。
ビルドホストに以下のツールがインストールされている。
- Docker バージョン 18.09 以降(BuildKit をサポート)
- Git
- GNU getopt
- GNU wget
- Java Development Kit (JDK)バージョン 11
- jq
手順
JetBrains Projector Editor Images リポジトリー のローカルコピーを取得します。
$ git clone https://github.com/che-incubator/jetbrains-editor-images $ cd jetbrains-editor-images
build スクリプトを実行し、IDE パッケージおよびパッケージバージョンを選択します。
$ ./projector.sh build [info] Select the IDE package to build (default is 'IntelliJ IDEA Community'): 1) IntelliJ IDEA Community 2) PyCharm Community [info] Select the IDE package version to build (default is '2020.3.3'): 1) 2020.3.3 2) 2020.3.2 3) 2020.3.1
イメージをテストするには、ローカルで実行して
http://localhost:8887
にアクセスし、IDE にアクセスします。$ ./projector.sh run
- CodeReady Workspaces がアクセスできるレジストリーにイメージを公開し、<registry>/<image>:<tag> の場所を覚えておいてください。
以下の内容を含む
meta.yaml
ファイルを作成します。apiVersion: v2 publisher: <publisher> 1 name: intellij-ide version: latest type: Che Editor displayName: IntelliJ Platform IDE title: IDE based on the IntelliJ Platform description: IDE based on the IntelliJ Platform running using Projector icon: https://www.jetbrains.com/apple-touch-icon.png category: Editor repository: https://github.com/che-incubator/jetbrains-editor-images firstPublicationDate: "2021-04-10" spec: endpoints: - name: intellij public: true targetPort: 8887 attributes: protocol: http type: ide path: /projector-client/index.html?backgroundColor=434343&wss containers: - name: intellij-ide image: <registry>/<image>:<tag> 2 mountSources: true volumes: - mountPath: "/home/projector-user" name: projector-user ports: - exposedPort: 8887 memoryLimit: "4096M"
-
CodeReady Workspaces がアクセスできる HTTPS リソースに
meta.yaml
ファイルを公開し、この IDE を使用するようにワークスペースを設定する際に生成される URL を<URL_to_meta.yaml>
としてコピーします。