diff --git a/docker/Dockerfile-alpine-320 b/docker/Dockerfile-alpine-320 index 26b54b6..1fe07f7 100644 --- a/docker/Dockerfile-alpine-320 +++ b/docker/Dockerfile-alpine-320 @@ -1,6 +1,7 @@ FROM alpine:3.20 -ENV PATH=/opt/R/4.4.1/bin:$PATH +ARG R_VERSION=4.4.1 +ENV PATH=/opt/R/${R_VERSION}/bin:$PATH ENV TZ="Europe/Berlin" ARG ARCH=arm64 @@ -10,7 +11,6 @@ ENV AWS_ACCESS_KEY_ID="" ENV AWS_SECRET_ACCESS_KEY="" ENV PGPASS="" - ARG GITHUB_PAT # Background: JAGS needs lapack & lapack-dev but these conflict with openblas-dev which is required by R-dev @@ -38,11 +38,11 @@ RUN mkdir -p ~/.R && bash -c 'echo -e "CXXFLAGS+=-D__MUSL__\nCPPFLAGS+= -D__MUSL # R repos RUN bash -c 'echo -e "options(crayon.enabled = TRUE, Ncpus = ${NCPUS}, future.globals.onReference = NULL, repos = structure(c(CRAN = \"https://cloud.r-project.org\", INLA = \"https://inla.r-inla-download.org/R/stable\")))" > /root/.Rprofile' -RUN bash -c 'echo -e "PKG_SYSREQS = TRUE\nPKG_SYSREQS_VERBOSE = TRUE" > /root/.Renviron' +RUN bash -c 'echo -e "PKG_SYSREQS=TRUE\nPKG_SYSREQS_VERBOSE=TRUE" > ~/.Renviron' ### INSTALL R -RUN curl -O https://devxy-r-builds.s3.eu-central-2.amazonaws.com/alpine320/r-4.4.1_1_$(arch).apk -RUN apk add --allow-untrusted r-4.4.1_1_$(arch).apk && rm r-4.4.1_1_$(arch).apk +RUN curl -O https://devxy-r-builds.s3.eu-central-2.amazonaws.com/alpine320/r-${R_VERSION}_1_$(arch).apk +RUN apk add --allow-untrusted r-${R_VERSION}_1_$(arch).apk && rm r-${R_VERSION}_1_$(arch).apk RUN R -q -e 'install.packages("remotes", repo = "cloud.r-project.org"); remotes::install_github("pat-s/pak@alpine")' @@ -51,6 +51,8 @@ RUN R -q -e 'install.packages("remotes", repo = "cloud.r-project.org"); remotes: RUN R -q -e 'pak::pak(c("DBI", "R6", "RPostgres", "Rcpp", "askpass", "base64enc", "bit64", "bit", "blob", "callr", "cli", "credentials", "curl", "data.table", "digest", "dplyr", "fansi", "fs", "future.apply", "future", "generics", "gert", "globals", "glue", "hms", "httr", "jsonlite", "lgr", "lifecycle", "listenv", "lubridate", "magrittr", "mime", "openssl", "parallelly", "paws.common", "paws.storage", "pillar", "pkgbuild", "pkgconfig", "processx", "progressr", "ps", "purrr", "rlang", "rstudioapi","s3fs", "stringi", "stringr", "sys", "tibble", "tidyselect", "timechange", "utf8", "vctrs", "withr", "xml2", "zip", "codetools", "RSQLite", "cachem", "crayon", "debugme", "fastmap", "memoise", "pat-s/cranlike@s3", "pat-s/desc@description-from-remote"))' COPY . . +# remove secrets from COPY +RUN rm /.Renviron /.envrc RUN R CMD INSTALL . && rm -rf r-pkg-binaries CMD ["/bin/bash"] \ No newline at end of file diff --git a/docker/Dockerfile-redhat-8 b/docker/Dockerfile-redhat-8 index 71e3f45..a6e1253 100644 --- a/docker/Dockerfile-redhat-8 +++ b/docker/Dockerfile-redhat-8 @@ -1,7 +1,8 @@ FROM redhat/ubi8 +ARG R_VERSION=4.4.1 ARG RED_HAT_DEV_PW -ENV PATH=/opt/R/4.4.1/bin:$PATH +ENV PATH=/opt/R/${R_VERSION}/bin:$PATH ENV TZ="Europe/Berlin" ENV ARCH=arm64 @@ -24,8 +25,8 @@ RUN dnf install -y -q make lapack-devel git gcc gcc-c++ fontconfig-devel fribidi RUN curl -q -L -O https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Source/JAGS-4.3.2.tar.gz && tar -xzf JAGS-4.3.2.tar.gz && cd JAGS-4.3.2 && ./configure --enable-silent-rules && make 2>&1 >/dev/null && rm -rf JAGS-4.3.2.tar.gz JAGS-4.3.2 && cd .. ### INSTALL R -RUN curl -O https://devxy-r-builds.s3.eu-central-2.amazonaws.com/el8/R-4.4.1-1-1.aarch64.rpm -RUN dnf install -q -y R-4.4.1-1-1.aarch64.rpm +RUN curl -O https://devxy-r-builds.s3.eu-central-2.amazonaws.com/el8/R-${R_VERSION}-1-1.aarch64.rpm +RUN dnf install -q -y R-${R_VERSION}-1-1.aarch64.rpm RUN R -q -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))' # Makevars @@ -40,6 +41,8 @@ RUN bash -c 'echo -e "PKG_SYSREQS = TRUE\nPKG_SYSREQS_VERBOSE = TRUE" > /root/.R RUN R -q -e 'pak::pak(c("DBI", "R6", "RPostgres", "Rcpp", "askpass", "base64enc", "bit64", "bit", "blob", "callr", "cli", "credentials", "curl", "data.table", "digest", "dplyr", "fansi", "fs", "future.apply", "future", "generics", "gert", "globals", "glue", "hms", "httr", "jsonlite", "lgr", "lifecycle", "listenv", "lubridate", "magrittr", "mime", "openssl", "parallelly", "paws.common", "paws.storage", "pillar", "pkgbuild", "pkgconfig", "processx", "progressr", "ps", "purrr", "rlang", "rstudioapi","s3fs", "stringi", "stringr", "sys", "tibble", "tidyselect", "timechange", "utf8", "vctrs", "withr", "xml2", "zip", "codetools", "RSQLite", "cachem", "crayon", "debugme", "fastmap", "memoise", "pat-s/cranlike@s3", "pat-s/desc@description-from-remote"))' COPY . . +# remove secrets from COPY +RUN rm /.Renviron /.envrc RUN R CMD INSTALL . && rm -rf r-pkg-binaries CMD ["/bin/bash"] \ No newline at end of file diff --git a/docker/Dockerfile-redhat-9 b/docker/Dockerfile-redhat-9 index eed454b..7358c1d 100644 --- a/docker/Dockerfile-redhat-9 +++ b/docker/Dockerfile-redhat-9 @@ -1,7 +1,8 @@ FROM redhat/ubi9 +ARG R_VERSION=4.4.1 ARG RED_HAT_DEV_PW -ENV PATH=/opt/R/4.4.1/bin:$PATH +ENV PATH=/opt/R/${R_VERSION}/bin:$PATH ENV TZ="Europe/Berlin" ENV ARCH=arm64 @@ -24,8 +25,8 @@ RUN dnf install -y -q make lapack-devel git gcc gcc-c++ fontconfig-devel fribidi RUN curl -q -L -O https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Source/JAGS-4.3.2.tar.gz && tar -xzf JAGS-4.3.2.tar.gz && cd JAGS-4.3.2 && ./configure --enable-silent-rules && make 2>&1 >/dev/null && rm -rf JAGS-4.3.2.tar.gz JAGS-4.3.2 && cd .. ### INSTALL R -RUN curl -O https://devxy-r-builds.s3.eu-central-2.amazonaws.com/el9/R-4.4.1-1-1.aarch64.rpm -RUN dnf install -q -y R-4.4.1-1-1.aarch64.rpm +RUN curl -O https://devxy-r-builds.s3.eu-central-2.amazonaws.com/el9/R-${R_VERSION}-1-1.aarch64.rpm +RUN dnf install -q -y R-${R_VERSION}-1-1.aarch64.rpm RUN R -q -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))' # Makevars @@ -40,6 +41,8 @@ RUN bash -c 'echo -e "PKG_SYSREQS = TRUE\nPKG_SYSREQS_VERBOSE = TRUE" > /root/.R RUN R -q -e 'pak::pak(c("DBI", "R6", "RPostgres", "Rcpp", "askpass", "base64enc", "bit64", "bit", "blob", "callr", "cli", "credentials", "curl", "data.table", "digest", "dplyr", "fansi", "fs", "future.apply", "future", "generics", "gert", "globals", "glue", "hms", "httr", "jsonlite", "lgr", "lifecycle", "listenv", "lubridate", "magrittr", "mime", "openssl", "parallelly", "paws.common", "paws.storage", "pillar", "pkgbuild", "pkgconfig", "processx", "progressr", "ps", "purrr", "rlang", "rstudioapi","s3fs", "stringi", "stringr", "sys", "tibble", "tidyselect", "timechange", "utf8", "vctrs", "withr", "xml2", "zip", "codetools", "RSQLite", "cachem", "crayon", "debugme", "fastmap", "memoise", "pat-s/cranlike@s3", "pat-s/desc@description-from-remote"))' COPY . . +# remove secrets from COPY +RUN rm /.Renviron /.envrc RUN R CMD INSTALL . && rm -rf r-pkg-binaries CMD ["/bin/bash"] \ No newline at end of file diff --git a/docker/Dockerfile-ubuntu-2204 b/docker/Dockerfile-ubuntu-2204 index 411b52c..10d2893 100644 --- a/docker/Dockerfile-ubuntu-2204 +++ b/docker/Dockerfile-ubuntu-2204 @@ -1,6 +1,7 @@ FROM ubuntu:jammy -ENV PATH=/opt/R/4.4.1/bin:$PATH +ARG R_VERSION=4.4.1 +ENV PATH=/opt/R/${R_VERSION}/bin:$PATH ENV TZ="Europe/Berlin" ENV DEBIAN_FRONTEND=noninteractive @@ -22,8 +23,8 @@ RUN apt update && apt install -y --no-install-recommends gdebi-core g++ gfortran RUN curl -q -L -O https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Source/JAGS-4.3.2.tar.gz && tar -xzf JAGS-4.3.2.tar.gz && cd JAGS-4.3.2 && ./configure --enable-silent-rules && make 2>&1 >/dev/null && rm -rf JAGS-4.3.2.tar.gz JAGS-4.3.2 && cd .. ### INSTALL R -RUN curl -O https://devxy-r-builds.s3.eu-central-2.amazonaws.com/2204/r-4.4.1_1_arm64.deb -RUN gdebi -n -qq r-4.4.1_1_arm64.deb && rm r-4.4.1_1_arm64.deb +RUN curl -O https://devxy-r-builds.s3.eu-central-2.amazonaws.com/2204/r-${R_VERSION}_1_arm64.deb +RUN gdebi -n -qq r-${R_VERSION}_1_arm64.deb && rm r-${R_VERSION}_1_arm64.deb RUN R -q -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))' # Makevars @@ -38,6 +39,8 @@ RUN bash -c 'echo -e "PKG_SYSREQS = TRUE\nPKG_SYSREQS_VERBOSE = TRUE" > /root/.R RUN R -q -e 'pak::pak(c("DBI", "R6", "RPostgres", "Rcpp", "askpass", "base64enc", "bit64", "bit", "blob", "callr", "cli", "credentials", "curl", "data.table", "digest", "dplyr", "fansi", "fs", "future.apply", "future", "generics", "gert", "globals", "glue", "hms", "httr", "jsonlite", "lgr", "lifecycle", "listenv", "lubridate", "magrittr", "mime", "openssl", "parallelly", "paws.common", "paws.storage", "pillar", "pkgbuild", "pkgconfig", "processx", "progressr", "ps", "purrr", "rlang", "rstudioapi","s3fs", "stringi", "stringr", "sys", "tibble", "tidyselect", "timechange", "utf8", "vctrs", "withr", "xml2", "zip", "codetools", "RSQLite", "cachem", "crayon", "debugme", "fastmap", "memoise", "pat-s/cranlike@s3", "pat-s/desc@description-from-remote"))' COPY . . +# remove secrets from COPY +RUN rm /.Renviron /.envrc RUN R CMD INSTALL . && rm -rf r-pkg-binaries CMD ["/bin/bash"] \ No newline at end of file diff --git a/docker/Dockerfile-ubuntu-2404 b/docker/Dockerfile-ubuntu-2404 index b224779..27c0b2e 100644 --- a/docker/Dockerfile-ubuntu-2404 +++ b/docker/Dockerfile-ubuntu-2404 @@ -1,6 +1,7 @@ FROM ubuntu:noble -ENV PATH=/opt/R/4.4.1/bin:$PATH +ARG R_VERSION=4.4.1 +ENV PATH=/opt/R/${R_VERSION}/bin:$PATH ENV TZ="Europe/Berlin" ENV DEBIAN_FRONTEND=noninteractive @@ -22,8 +23,8 @@ RUN apt update && apt install -y --no-install-recommends gdebi-core g++ gfortran RUN curl -q -L -O https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Source/JAGS-4.3.2.tar.gz && tar -xzf JAGS-4.3.2.tar.gz && cd JAGS-4.3.2 && ./configure --enable-silent-rules && make 2>&1 >/dev/null && rm -rf JAGS-4.3.2.tar.gz JAGS-4.3.2 && cd .. ### INSTALL R -RUN curl -O https://devxy-r-builds.s3.eu-central-2.amazonaws.com/2404/r-4.4.1_1_arm64.deb -RUN gdebi -n -qq r-4.4.1_1_arm64.deb && rm r-4.4.1_1_arm64.deb +RUN curl -O https://devxy-r-builds.s3.eu-central-2.amazonaws.com/2404/r-${R_VERSION}_1_arm64.deb +RUN gdebi -n -qq r-${R_VERSION}_1_arm64.deb && rm r-${R_VERSION}_1_arm64.deb RUN R -q -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))' # Makevars @@ -38,6 +39,8 @@ RUN bash -c 'echo -e "PKG_SYSREQS = TRUE\nPKG_SYSREQS_VERBOSE = TRUE" > /root/.R RUN R -q -e 'pak::pak(c("DBI", "R6", "RPostgres", "Rcpp", "askpass", "base64enc", "bit64", "bit", "blob", "callr", "cli", "credentials", "curl", "data.table", "digest", "dplyr", "fansi", "fs", "future.apply", "future", "generics", "gert", "globals", "glue", "hms", "httr", "jsonlite", "lgr", "lifecycle", "listenv", "lubridate", "magrittr", "mime", "openssl", "parallelly", "paws.common", "paws.storage", "pillar", "pkgbuild", "pkgconfig", "processx", "progressr", "ps", "purrr", "rlang", "rstudioapi","s3fs", "stringi", "stringr", "sys", "tibble", "tidyselect", "timechange", "utf8", "vctrs", "withr", "xml2", "zip", "codetools", "RSQLite", "cachem", "crayon", "debugme", "fastmap", "memoise", "pat-s/cranlike@s3", "pat-s/desc@description-from-remote"))' COPY . . +# remove secrets from COPY +RUN rm /.Renviron /.envrc RUN R CMD INSTALL . && rm -rf r-pkg-binaries CMD ["/bin/bash"] \ No newline at end of file