11# Ubuntu 22.04 (Jammy) · R 4.2 · Dependencies for ExampleStudy
2- FROM --platform=linux/amd64 rocker/rstudio:4.2
2+ # For Snowflake ODBC use: docker build --platform linux/amd64 ...
3+ ARG TARGETPLATFORM=linux/amd64
4+ FROM --platform=${TARGETPLATFORM} rocker/rstudio:4.2
35LABEL org.opencontainers.image.maintainer="Adam Black <a.black@darwin-eu.org>"
46
57# Install java and rJava
@@ -11,15 +13,13 @@ RUN apt-get -y update && apt-get install -y \
1113 && rm -rf /var/lib/apt/lists/ \
1214 && sudo R CMD javareconf
1315
14- # Snapshot must be >= 2024-04-18 for CirceR (first on CRAN that date); use 2024-05-15 for stability
1516RUN echo 'options(repos = c(CRAN = "https://packagemanager.posit.co/cran/__linux__/jammy/2026-02-01"))' >>"${R_HOME}/etc/Rprofile.site"
1617RUN install2.r --error rJava && rm -rf /tmp/download_packages/ /tmp/*.rds
1718RUN install2.r --error DatabaseConnector && rm -rf /tmp/download_packages/ /tmp/*.rds
1819ENV DATABASECONNECTOR_JAR_FOLDER="/opt/hades/jdbc_drivers"
1920RUN R -e "DatabaseConnector::downloadJdbcDrivers('all');"
2021
2122RUN install2.r --error Andromeda && rm -rf /tmp/download_packages/ /tmp/*.rds
22- # CirceR depends on rJava and RJSONIO; install RJSONIO explicitly to avoid dependency issues
2323RUN install2.r --error RJSONIO && rm -rf /tmp/download_packages/ /tmp/*.rds
2424RUN install2.r --error CirceR && rm -rf /tmp/download_packages/ /tmp/*.rds
2525RUN install2.r --error SqlRender && rm -rf /tmp/download_packages/ /tmp/*.rds
@@ -34,13 +34,12 @@ RUN apt-get -y update && apt-get install -y \
3434RUN install2.r --error openssl httr xml2 remotes \
3535 && rm -rf /tmp/download_packages/ /tmp/*.rds
3636
37- # Install odbc and RPostgres drivers
37+ # Install odbc and RPostgres drivers (pkg-config so R odbc package configure finds unixODBC)
3838RUN apt-get -y update && apt-get install -y --install-suggests \
39- unixodbc unixodbc-dev libpq-dev curl \
39+ unixodbc unixodbc-dev libpq-dev curl pkg-config \
4040 && apt-get clean \
41- && rm -rf /var/lib/apt/lists/
42-
43- RUN install2.r --error odbc RPostgres duckdb \
41+ && rm -rf /var/lib/apt/lists/ \
42+ && install2.r --error odbc RPostgres duckdb \
4443 && rm -rf /tmp/download_packages/ /tmp/*.rds
4544
4645# Install Darwin packages (and study Imports: dplyr, ggplot2, shiny, plotly)
0 commit comments