Skip to content

Commit 8ca3f3f

Browse files
authored
feat: add opencode to IDE images (#378)
1 parent e6281da commit 8ca3f3f

8 files changed

Lines changed: 28 additions & 0 deletions

File tree

base/scripts/install-opencode.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Install opencode using the official installer
5+
curl -fsSL https://opencode.ai/install | bash -s -- --no-modify-path
6+
7+
# Make opencode available system-wide
8+
mv ${HOME}/.opencode/bin/opencode /usr/local/bin/opencode
9+
rm -rf ${HOME}/.opencode

base/scripts/onyxia-init.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ if command -v R >/dev/null 2>&1; then
232232
fi
233233
fi
234234

235+
235236
# The commands related to setting the various repositories (R/CRAN, pip)
236237
# are located in specific script
237238
source /opt/onyxia-set-repositories.sh

jupyter/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ RUN /opt/install-jupyterlab.sh && \
2121
# Generate jupyter server config
2222
jupyter server --generate-config && \
2323
jupyter lab clean && \
24+
# Install opencode
25+
/opt/install-opencode.sh && \
2426
# Fix user permissions
2527
/opt/fix-user-permissions.sh && \
2628
# Clean

jupyter/tests.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,7 @@ commandTests:
4545
command: "which"
4646
args: ["duckdb"]
4747
expectedOutput: ["/usr/local/bin/duckdb"]
48+
- name: "Does the binary exists?"
49+
command: "which"
50+
args: ["opencode"]
51+
expectedOutput: ["/usr/local/bin/opencode"]

rstudio/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ COPY --chmod=0755 scripts/ /opt/
1717
RUN /rocker_scripts/install_rstudio.sh && \
1818
/rocker_scripts/install_pandoc.sh && \
1919
/opt/configure-rstudio.sh && \
20+
# Install opencode
21+
/opt/install-opencode.sh && \
2022
# Fix user permissions
2123
/opt/fix-user-permissions.sh && \
2224
# Clean

rstudio/tests.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,7 @@ commandTests:
4141
command: "which"
4242
args: ["duckdb"]
4343
expectedOutput: ["/usr/local/bin/duckdb"]
44+
- name: "Does the binary exists?"
45+
command: "which"
46+
args: ["opencode"]
47+
expectedOutput: ["/usr/local/bin/opencode"]

vscode/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ COPY --chown=${USERNAME}:${GROUPNAME} settings/Remote.json ${REMOTE_CONFIG_DIR}/
1515
# Install VSCode
1616
RUN /opt/install-vscode.sh && \
1717
/opt/install-vscode-extensions.sh && \
18+
# Install opencode
19+
/opt/install-opencode.sh && \
1820
# Fix user permissions
1921
/opt/fix-user-permissions.sh && \
2022
# Clean

vscode/tests.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@ commandTests:
3737
command: "which"
3838
args: ["duckdb"]
3939
expectedOutput: ["/usr/local/bin/duckdb"]
40+
- name: "Does the binary exists?"
41+
command: "which"
42+
args: ["opencode"]
43+
expectedOutput: ["/usr/local/bin/opencode"]

0 commit comments

Comments
 (0)