Skip to content

Commit

Permalink
fix(rstudio-server): supports ubuntu noble (#246)
Browse files Browse the repository at this point in the history
Fix #232
  • Loading branch information
eitsupi authored Nov 14, 2024
1 parent 0799a2a commit 87b90c5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/rstudio-server/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Supported platforms

`linux/amd64` and `linux/arm64` platform `ubuntu:focal` and `ubuntu:jammy`.
`linux/amd64` and `linux/arm64` platform `ubuntu:focal`, `ubuntu:jammy` and `ubuntu:noble`.

`linux/arm64` platform supports are currently experimental and only available on daily builds for testing purposes.
([rstudio/rstudio#13340](https://github.com/rstudio/rstudio/issues/13340))
Expand Down
2 changes: 1 addition & 1 deletion src/rstudio-server/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "RStudio Server",
"id": "rstudio-server",
"version": "0.3.0",
"version": "0.3.1",
"description": "Installs the RStudio Server, enables to run the RStudio IDE on the browser.",
"documentationURL": "https://github.com/rocker-org/devcontainer-features/tree/main/src/rstudio-server",
"options": {
Expand Down
17 changes: 12 additions & 5 deletions src/rstudio-server/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,27 @@ install_rstudio() {
local deb_file="rstudio-server.deb"
local install_url
local architecture
local ubuntu_codename
architecture="$(dpkg --print-architecture)"
# Exported from /etc/os-release
ubuntu_codename="${UBUNTU_CODENAME}"

if [ "${ubuntu_codename}" = "noble" ]; then
ubuntu_codename="jammy"
fi

mkdir -p /tmp/rstudio-server
pushd /tmp/rstudio-server

if [[ "${version}" == "stable" ]] || [[ "${version}" == "preview" ]] || [[ "${version}" == "daily" ]]; then
install_url="https://rstudio.org/download/latest/${version}/server/${UBUNTU_CODENAME}/rstudio-server-latest-${architecture}.deb"
install_url="https://rstudio.org/download/latest/${version}/server/${ubuntu_codename}/rstudio-server-latest-${architecture}.deb"
echo "Download from ${install_url}"
curl -fsLo "${deb_file}" "${install_url}" ||
echo "(!) Version ${version} for ${UBUNTU_CODENAME} ${architecture} is not found"
echo "(!) Version ${version} for ${ubuntu_codename} ${architecture} is not found"
else
curl -fsLo "${deb_file}" "https://download2.rstudio.org/server/${UBUNTU_CODENAME}/${architecture}/rstudio-server-${version/"+"/"-"}-${architecture}.deb" ||
curl -fsLo "${deb_file}" "https://s3.amazonaws.com/rstudio-ide-build/server/${UBUNTU_CODENAME}/${architecture}/rstudio-server-${version/"+"/"-"}-${architecture}.deb" ||
echo "(!) Version ${version} for ${UBUNTU_CODENAME} ${architecture} is not found"
curl -fsLo "${deb_file}" "https://download2.rstudio.org/server/${ubuntu_codename}/${architecture}/rstudio-server-${version/"+"/"-"}-${architecture}.deb" ||
curl -fsLo "${deb_file}" "https://s3.amazonaws.com/rstudio-ide-build/server/${ubuntu_codename}/${architecture}/rstudio-server-${version/"+"/"-"}-${architecture}.deb" ||
echo "(!) Version ${version} for ${ubuntu_codename} ${architecture} is not found"
fi

gdebi --non-interactive "${deb_file}"
Expand Down

0 comments on commit 87b90c5

Please sign in to comment.