@@ -4,7 +4,8 @@ description: Learn how to run multiple instances of JetBrains IDEs in Coder.
4
4
---
5
5
6
6
This article walks you through the process of configuring Coder to support the
7
- use of multiple instances of the same JetBrains IDE.
7
+ use of multiple instances of the same JetBrains IDE using the JetBrains
8
+ Projector CLI.
8
9
9
10
![ Multiple IntelliJ icons in a
10
11
workspace] ( ../../assets/workspaces/multi-intellij-icons-smaller.png )
@@ -20,7 +21,7 @@ You will:
20
21
This article shows you how to configure multiple instances of IntelliJ IDEA
21
22
Ultimate, but you can use this process for any JetBrains IDEs.
22
23
23
- > Using additional JetBrains IDEs consume extra workspace compute resources, so
24
+ > Using additional JetBrains IDEs consumes extra workspace compute resources, so
24
25
> ensure that you've allocated enough resources to your workspace to support all
25
26
> of your IDE instances.
26
27
@@ -41,6 +42,15 @@ Ultimate, but you can use this process for any JetBrains IDEs.
41
42
# Create a symbolic link in PATH that points to the Intellij startup script.
42
43
RUN ln -s /opt/idea/bin/idea.sh /usr/bin/intellij-idea-ultimate
43
44
45
+ # Packages required for JetBrains-in-a-browser support
46
+ RUN apt-get update && \
47
+ DEBIAN_FRONTEND="noninteractive" apt-get install -y \
48
+ libxtst6 \
49
+ libxrender1 \
50
+ libfontconfig1 \
51
+ libxi6 \
52
+ libgtk-3-0
53
+
44
54
# bash .profile so projector can be added to the path
45
55
COPY [".profile" , "/coder/.profile" ]
46
56
@@ -55,17 +65,11 @@ Ultimate, but you can use this process for any JetBrains IDEs.
55
65
USER coder
56
66
```
57
67
58
- 1 . Add the JetBrains Projector CLI to the workspace's PATH (in this example,
59
- ` .profile ` is located in the Coder directory within the directory that
60
- contains the image's Dockerfile:
61
-
62
- ``` console
63
- export PATH=$PATH:$HOME/.local/bin
64
- ```
65
-
66
68
1 . Create the configure script that installs the Projector CLI into
67
- ` /home/coder ` and uses the CLI to install additional JetBrains IDEs. Each IDE
68
- configuration has a different directory in ` /home/coder/.projector/configs ` .
69
+ ` /home/coder ` and uses the CLI to create additional JetBrains IDE config
70
+ folders. Each IDE configuration has a different directory in
71
+ ` /home/coder/.projector/configs ` .
72
+
69
73
In this example, the configure script is in the directory that contains the
70
74
image's Dockerfile:
71
75
@@ -75,10 +79,6 @@ Ultimate, but you can use this process for any JetBrains IDEs.
75
79
# install projector into /home/coder/ pvc
76
80
pip3 install projector-installer --user
77
81
78
- # put projector CLI into path
79
- cp /coder/.profile $HOME
80
- source $HOME/.profile
81
-
82
82
# autoinstall intellij version specifying config name and port
83
83
$HOME/.local/bin/projector --accept-license
84
84
@@ -214,6 +214,38 @@ Ultimate, but you can use this process for any JetBrains IDEs.
214
214
port : 8999
215
215
` ` `
216
216
217
+ The configure script example above auto-installs the JetBrains IDE into the
218
+ ` /home/coder` folder. If you have an air-gapped deployment or want to use the
219
+ existing Coder-installed JetBrains IDE, replace the auto-install command with
220
+ Projector's configure command :
221
+
222
+ ` ` ` sh
223
+ INTELLIJ_PATH=$HOME/.projector/apps/idea
224
+
225
+ if [ -d $INTELLIJ_PATH ]; then
226
+ echo 'intellij IDE has already been copied - skip step'
227
+ else
228
+ echo 'copying Coder-installed JetBrains IntelliJ IDE into /home/coder'
229
+ cp -R /opt/idea $HOME/.projector/apps
230
+ fi
231
+
232
+ PROJECTOR_CONFIG_PATH=$HOME/.projector/configs/IntelliJ_2
233
+
234
+ if [ -d $PROJECTOR_CONFIG_PATH ]; then
235
+ echo 'projector has already been configured - skip step'
236
+ else
237
+ echo 'creating projector config folders to support running multiple IntelliJ IDEs'
238
+ $HOME/.local/bin/projector config add IntelliJ_2 $HOME/.projector/apps/idea --port 8997 --hostname=localhost --use-separate-config
239
+ $HOME/.local/bin/projector config add IntelliJ_3 $HOME/.projector/apps/idea --port 8998 --hostname=localhost --use-separate-config
240
+ $HOME/.local/bin/projector config add IntelliJ_4 $HOME/.projector/apps/idea --port 8999 --hostname=localhost --use-separate-config
241
+ fi
242
+ ` ` `
243
+
244
+ If you do not want to use workspace applications (i.e., the icons and
245
+ ` config.yaml` file), you can create dev URLs for each additional IntelliJ IDE
246
+ and launch the `run.sh` script in `.projector/configs/<your config name>` on the
247
+ appropriate port.
248
+
217
249
> See Projector's CLI documentation for additional information on
218
250
> [installation](https://github.com/JetBrains/projector-installer#Installation)
219
251
> and the
0 commit comments