5.7.4.2. IntelliJ Platform をベースにした IDE のイメージのビルド
この手順では、IntelliJ Platform バージョン 20203 をベースにした IDE のイメージをビルドする方法を説明します。JetBrains IDE の場合、IDE バージョン番号は IntelliJ Platform のバージョンに対応します。互換性のある IDE の一覧 を参照してください。
前提条件
- ビルドホストには、少なくとも 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パラメーターを使用してビルドスクリプトを実行します。
$ ./projector build --tag <tag> --url <URL>--tag <tag>-
name:tag形式のビルド後にイメージに適用する名前およびタグ。 --url <url>IntelliJ Platform バージョン 2020.3 をベースとする IDE のアーカイブを参照する URL。アーカイブは Linux プラットフォームを対象にし、
tar.gz形式であり、JetBrains Runtime (JBR) を含める必要があります。例5.1 IntelliJ IDEA Community 2020.3.3 でのイメージのビルド
./projector.sh build --tag che-idea:2020.3.3 \ --url https://download-cdn.jetbrains.com/idea/ideaIC-2020.3.3.tar.gz例5.2 PyCharm Community 2020.3.5 でのイメージのビルド
$ ./projector.sh build --tag che-pycharm:2020.3.5 \ --url https://download.jetbrains.com/python/pycharm-community-2020.3.5.tar.gz例5.3 WebStorm 2020.3.3 でのイメージのビルド
$ ./projector.sh build --tag che-webstorm:2020.3.3 \ --url https://download.jetbrains.com/webstorm/WebStorm-2020.3.3.tar.gz例5.4 IntelliJ IDEA Ultimate 2020.2.2 でのイメージのビルド
$ ./projector.sh build --tag che-idea-ultimate:2020.2.2 \ --url https://download.jetbrains.com/idea/ideaIU-2020.2.2.tar.gz例5.5 Android Studio 4.2.0.22 でのイメージのビルド
$ ./projector.sh build --tag che-android-studio:4.2.0.22 \ --url https://redirector.gvt1.com/edgedl/android/studio/ide-zips/4.2.0.22/android-studio-ide-202.7188722-linux.tar.gz
イメージをテストするには、ローカルで実行して
http://localhost:8887にアクセスし、IDE にアクセスします。$ ./projector.sh run <tag>例5.6 IntelliJ IDEA Community 2020.3.3 でのイメージのテスト
$ ./projector.sh run che-idea:2020.3.3例5.7 PyCharm 2020.3.5 でのイメージのテスト
$ ./projector.sh run che-pycharm:2020.3.5例5.8 WebStorm 2020.3.3 でのイメージのテスト
$ ./projector.sh run che-webstorm:2020.3.3例5.9 IntelliJ IDEA Ultimate 2020.2.2 でのイメージのテスト
$ ./projector.sh run che-idea-ultimate:2020.2.2例5.10 Android Studio 4.2.0.22 でのイメージのテスト
$ ./projector.sh run che-android-studio:4.2.0.22- CodeReady Workspaces がアクセスできるレジストリーにイメージを公開し、<registry>/<image>:<tag> の場所を覚えておいてください。
CodeReady Workspaces の IDE メタデータが含まれる
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>としてコピーします。