Skip to content

Commit 31aabd3

Browse files
committed
Update Dockerfile
1 parent 33ff495 commit 31aabd3

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

template/Dockerfile

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
FROM python:3.10.14
22

3-
ENV JAVA_HOME=/opt/java/openjdk
4-
ENV PATH="${JAVA_HOME}/bin:${PATH}"
5-
63
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends \
74
build-essential curl git util-linux jq sudo nodejs npm fonts-noto-cjk
85

@@ -11,15 +8,19 @@ ENV PIP_DEFAULT_TIMEOUT=100 \
118
PIP_NO_CACHE_DIR=1 \
129
JUPYTER_CONFIG_PATH="/root/.jupyter" \
1310
IPYTHON_CONFIG_PATH="/root/.ipython" \
14-
SERVER_PATH="/root/.server"
11+
SERVER_PATH="/root/.server" \
12+
R_VERSION=4.4.2
13+
14+
ENV R_HOME=/opt/R/${R_VERSION} \
15+
JAVA_HOME=/opt/java/openjdk
1516

1617
# Install Jupyter
1718
COPY ./requirements.txt requirements.txt
1819
RUN pip install --no-cache-dir -r requirements.txt && ipython kernel install --name "python3" --user
1920

2021
# R Kernel
21-
RUN apt-get update && apt-get install -y r-base
22-
RUN R -e "install.packages('IRkernel')"
22+
RUN curl -O https://cdn.rstudio.com/r/debian-12/pkgs/r-${R_VERSION}_1_amd64.deb && sudo apt-get update && sudo apt-get install -y ./r-${R_VERSION}_1_amd64.deb && ln -s ${R_HOME}/bin/R /usr/bin/R
23+
RUN R -e "install.packages('IRkernel', repos='https://cloud.r-project.org')"
2324
RUN R -e "IRkernel::installspec(user = FALSE, name = 'r', displayname = 'R')"
2425

2526
# Javascript Kernel
@@ -63,6 +64,8 @@ COPY startup_scripts/* $IPYTHON_CONFIG_PATH/profile_default/startup
6364

6465

6566
COPY --from=eclipse-temurin:11-jdk $JAVA_HOME $JAVA_HOME
67+
RUN ln -s ${JAVA_HOME}/bin/java /usr/bin/java
68+
6669
# Java Kernel
6770
RUN wget https://github.com/SpencerPark/IJava/releases/download/v1.3.0/ijava-1.3.0.zip && \
6871
unzip ijava-1.3.0.zip && \

0 commit comments

Comments
 (0)