|
| 1 | +## Ubuntu 20.04 with RStudio |
| 2 | +FROM ghcr.io/rocker-org/rstudio:4.2.1 |
| 3 | + |
| 4 | +## |
| 5 | +## System requirements |
| 6 | +## |
| 7 | +RUN apt-get update \ |
| 8 | + && apt-get install -y --no-install-recommends \ |
| 9 | + wget \ |
| 10 | + libcurl4-openssl-dev \ |
| 11 | + libssl-dev \ |
| 12 | + curl \ |
| 13 | + bash \ |
| 14 | + git \ |
| 15 | + && rm -rf /var/lib/apt/lists/* |
| 16 | + |
| 17 | +## |
| 18 | +## Install Java 21 from eclipse-temurin (For connection to IRIS) |
| 19 | +## |
| 20 | +ENV JAVA_HOME=/opt/java/openjdk |
| 21 | +COPY --from=eclipse-temurin:21 ${JAVA_HOME} ${JAVA_HOME} |
| 22 | +ENV PATH="${JAVA_HOME}/bin:${PATH}" |
| 23 | + |
| 24 | +## |
| 25 | +## Intersystems database |
| 26 | +## |
| 27 | +RUN wget https://github.com/intersystems-community/iris-driver-distribution/raw/main/JDBC/JDK18/intersystems-jdbc-3.8.0.jar --output-document=intersystems-jdbc.jar |
| 28 | + |
| 29 | +## |
| 30 | +## Install uv |
| 31 | +## Install Python 3.10 and Python package dependencies |
| 32 | +## |
| 33 | +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ |
| 34 | +RUN apt-get update \ |
| 35 | + && apt-get install -y --no-install-recommends \ |
| 36 | + software-properties-common \ |
| 37 | + && rm -rf /var/lib/apt/lists/* |
| 38 | +RUN add-apt-repository ppa:deadsnakes/ppa |
| 39 | +RUN apt-get update \ |
| 40 | + && apt-get install -y --no-install-recommends \ |
| 41 | + python3.10 python3.10-dev python3.10-tk python3.10-distutils \ |
| 42 | + && rm -rf /var/lib/apt/lists/* |
| 43 | + |
| 44 | +RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 && update-alternatives --config python3 |
| 45 | +COPY requirements.txt . |
| 46 | +#RUN python3.10 -m pip install --no-cache-dir -r requirements.txt |
| 47 | +#RUN python3 -m pip install --no-cache-dir -r requirements.txt |
| 48 | +RUN uv pip install --system --no-cache-dir -r requirements.txt |
| 49 | + |
| 50 | +## |
| 51 | +## Rstudio initializations |
| 52 | +## |
| 53 | +# NB: this file is only used by rocker if the env var DISABLE_AUTH: true is specified in the application.yml |
| 54 | +RUN echo "www-frame-origin=same" >> /etc/rstudio/disable_auth_rserver.conf |
| 55 | +RUN echo "www-verify-user-agent=0" >> /etc/rstudio/disable_auth_rserver.conf |
| 56 | +ADD 03_setup_root_path.sh /etc/cont-init.d/03_setup_root_path.sh |
| 57 | +ADD 04_copy_env.sh /etc/cont-init.d/04_copy_env.sh |
0 commit comments