@@ -35,7 +35,7 @@ rm -rf ~/JetBrains/backends/IU/*.tar.gz
35
35
Add the following command to your template's ` startup_script ` :
36
36
37
37
``` shell
38
- ~ /JetBrains/backends/IU/ideaIU-243.26053.27 /bin/remote-dev-server.sh registerBackendLocationForGateway
38
+ ~ /JetBrains/* /bin/remote-dev-server.sh registerBackendLocationForGateway
39
39
```
40
40
41
41
## Configure JetBrains Gateway Module
@@ -46,24 +46,24 @@ If you are using our [jetbrains-gateway](https://registry.coder.com/modules/code
46
46
module "jetbrains_gateway" {
47
47
count = data.coder_workspace.me.start_count
48
48
source = "registry.coder.com/modules/jetbrains-gateway/coder"
49
- version = "1.0.28 "
49
+ version = "1.0.29 "
50
50
agent_id = coder_agent.main.id
51
51
folder = "/home/coder/example"
52
52
jetbrains_ides = ["IU"]
53
53
default = "IU"
54
54
latest = false
55
55
jetbrains_ide_versions = {
56
56
"IU" = {
57
- build_number = "243.26053.27 "
58
- version = "2024.3 "
57
+ build_number = "251.25410.129 "
58
+ version = "2025.1 "
59
59
}
60
60
}
61
61
}
62
62
63
63
resource "coder_agent" "main" {
64
64
...
65
65
startup_script = <<-EOF
66
- ~/JetBrains/backends/IU/ideaIU-243.26053.27 /bin/remote-dev-server.sh registerBackendLocationForGateway
66
+ ~/JetBrains/* /bin/remote-dev-server.sh registerBackendLocationForGateway
67
67
EOF
68
68
}
69
69
```
@@ -73,45 +73,21 @@ resource "coder_agent" "main" {
73
73
If you are using Docker based workspaces, you can add the command to your Dockerfile:
74
74
75
75
``` dockerfile
76
- FROM ubuntu
77
-
78
- # Combine all apt operations in a single RUN command
79
- # Install only necessary packages
80
- # Clean up apt cache in the same layer
81
- RUN apt-get update \
82
- && apt-get install -y --no-install-recommends \
83
- curl \
84
- git \
85
- golang \
86
- sudo \
87
- vim \
88
- wget \
89
- && apt-get clean \
90
- && rm -rf /var/lib/apt/lists/*
91
-
92
- # Create user in a single layer
93
- ARG USER=coder
94
- RUN useradd --groups sudo --no-create-home --shell /bin/bash ${USER} \
95
- && echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/${USER} \
96
- && chmod 0440 /etc/sudoers.d/${USER}
97
-
98
- USER ${USER}
99
- WORKDIR /home/${USER}
100
-
101
- # Install JetBrains Gateway in a single RUN command to reduce layers
102
- # Download, extract, use, and clean up in the same layer
76
+ FROM codercom/enterprise-base:ubuntu
77
+
78
+ # JetBrains IDE installation (configurable)
79
+ ARG IDE_CODE=IU
80
+ ARG IDE_VERSION=2025.1
81
+
82
+ # Fetch and install IDE dynamically
103
83
RUN mkdir -p ~/JetBrains \
104
- && wget -q https://download.jetbrains.com/idea/code-with-me/backend/jetbrains-clients-downloader-linux-x86_64-1867.tar.gz -P /tmp \
105
- && tar -xzf /tmp/jetbrains-clients-downloader-linux-x86_64-1867.tar.gz -C /tmp \
106
- && /tmp/jetbrains-clients-downloader-linux-x86_64-1867/bin/jetbrains-clients-downloader \
107
- --products-filter IU \
108
- --build-filter 243.26053.27 \
109
- --platforms-filter linux-x64 \
110
- --download-backends ~/JetBrains \
111
- && tar -xzf ~/JetBrains/backends/IU/*.tar.gz -C ~/JetBrains/backends/IU \
112
- && rm -f ~/JetBrains/backends/IU/*.tar.gz \
113
- && rm -rf /tmp/jetbrains-clients-downloader-linux-x86_64-1867* \
114
- && rm -rf /tmp/*.tar.gz
84
+ && IDE_URL=$(curl -s "https://data.services.jetbrains.com/products/releases?code=${IDE_CODE}&majorVersion=${IDE_VERSION}&latest=true" | jq -r ".${IDE_CODE}[0].downloads.linux.link" ) \
85
+ && IDE_NAME=$(curl -s "https://data.services.jetbrains.com/products/releases?code=${IDE_CODE}&majorVersion=${IDE_VERSION}&latest=true" | jq -r ".${IDE_CODE}[0].name" ) \
86
+ && echo "Installing ${IDE_NAME}..." \
87
+ && wget -q ${IDE_URL} -P /tmp \
88
+ && tar -xzf /tmp/$(basename ${IDE_URL}) -C ~/JetBrains \
89
+ && rm -f /tmp/$(basename ${IDE_URL}) \
90
+ && echo "${IDE_NAME} installed successfully"
115
91
```
116
92
117
93
## Next steps
0 commit comments