remove secrets from COPY
This commit is contained in:
parent
989f7766ed
commit
aea5d9597d
1 changed files with 31 additions and 17 deletions
|
|
@ -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"]
|
||||
Loading…
Reference in a new issue