kopia lustrzana https://github.com/jupyterhub/repo2docker
Support installing RStudio on distros without openssl1.1
rodzic
99125ab179
commit
0a3846f5d9
|
@ -14,10 +14,17 @@ def rstudio_base_scripts(r_version):
|
|||
shiny_proxy_version = "1.1"
|
||||
shiny_sha256sum = "80f1e48f6c824be7ef9c843bb7911d4981ac7e8a963e0eff823936a8b28476ee"
|
||||
|
||||
rstudio_url = "https://download2.rstudio.org/server/bionic/amd64/rstudio-server-2022.02.1-461-amd64.deb"
|
||||
rstudio_sha256sum = (
|
||||
"239e8d93e103872e7c6d827113d88871965f82ffb0397f5638025100520d8a54"
|
||||
)
|
||||
|
||||
# RStudio server has different builds based on wether OpenSSL 3 or 1.1 is available in the base
|
||||
# image. 3 is present Jammy+, 1.1 until then. Instead of hardcoding URLs based on distro, we actually
|
||||
# check for the dependency itself directly in the code below. You can find these URLs in
|
||||
# https://posit.co/download/rstudio-server/, toggling between Ubuntu 22 (for openssl3) vs earlier versions (openssl 1.1)
|
||||
# you may forget about openssl, but openssl never forgets you.
|
||||
rstudio_openssl3_url = 'https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2022.12.0-353-amd64.deb'
|
||||
rstudio_openssl3_sha256sum = 'a5aa2202786f9017a6de368a410488ea2e4fc6c739f78998977af214df0d6288'
|
||||
|
||||
rstudio_openssl1_url = 'https://download2.rstudio.org/server/bionic/amd64/rstudio-server-2022.12.0-353-amd64.deb'
|
||||
rstudio_openssl1_sha256sum = 'bb88e37328c304881e60d6205d7dac145525a5c2aaaf9da26f1cb625b7d47e6e'
|
||||
rsession_proxy_version = "2.0.1"
|
||||
|
||||
return [
|
||||
|
@ -27,11 +34,18 @@ def rstudio_base_scripts(r_version):
|
|||
# but here it's important because these recommend r-base,
|
||||
# which will upgrade the installed version of R, undoing our pinned version
|
||||
rf"""
|
||||
curl --silent --location --fail {rstudio_url} > /tmp/rstudio.deb && \
|
||||
curl --silent --location --fail {shiny_server_url} > /tmp/shiny.deb && \
|
||||
echo '{rstudio_sha256sum} /tmp/rstudio.deb' | sha256sum -c - && \
|
||||
echo '{shiny_sha256sum} /tmp/shiny.deb' | sha256sum -c - && \
|
||||
apt-get update > /dev/null && \
|
||||
if apt-cache search libssl3 > /dev/null; then \
|
||||
RSTUDIO_URL="{rstudio_openssl3_url}" ;\
|
||||
RSTUDIO_HASH="{rstudio_openssl3_sha256sum}" ;\
|
||||
else \
|
||||
RSTUDIO_URL="{rstudio_openssl1_url}" ;\
|
||||
RSTUDIO_HASH="{rstudio_openssl1_sha256sum}" ;\
|
||||
fi && \
|
||||
curl --silent --location --fail ${{RSTUDIO_URL}} > /tmp/rstudio.deb && \
|
||||
curl --silent --location --fail {shiny_server_url} > /tmp/shiny.deb && \
|
||||
echo "${{RSTUDIO_HASH}} /tmp/rstudio.deb' | sha256sum -c - && \
|
||||
echo '{shiny_sha256sum} /tmp/shiny.deb' | sha256sum -c - && \
|
||||
apt install -y --no-install-recommends /tmp/rstudio.deb /tmp/shiny.deb && \
|
||||
rm /tmp/*.deb && \
|
||||
apt-get -qq purge && \
|
||||
|
|
Ładowanie…
Reference in New Issue