install libxml2-dev in dockerfiles

This commit is contained in:
Patrick Schratz 2024-09-05 09:48:23 +02:00
commit f17602f248
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -5,7 +5,7 @@ ENV TZ="Europe/Berlin"
# Background: JAGS needs lapack & lapack-dev but these conflict with openblas-dev which is required by R-dev
# Solution: first compile JAGS, then remove lapack & lapack-dev again
RUN apk add -q --no-cache curl tar make lapack lapack-dev blas blas-dev gcc gfortran g++ htop git
RUN apk add -q --no-cache curl tar make lapack lapack-dev blas blas-dev gcc gfortran g++ htop git libxml2-dev
### CUSTOM DEPENDENCIES
# These usually are not packaged in OS repositories and need to be installed from source
@ -30,6 +30,7 @@ RUN apk add --allow-untrusted r-4.4.1_1_$(arch).apk && rm r-4.4.1_1_$(arch).apk
RUN R -q -e 'install.packages("remotes", repo = "cloud.r-project.org"); remotes::install_github("pat-s/pak@alpine")'
COPY . .
RUN apk add libxml2-dev
# FIXME: switch to pak after https://github.com/r-lib/pak/issues/628
RUN export ARCH=$(echo $(uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')) && \
R -q -e 'Sys.setenv(PKG_SYSREQS = TRUE, PKG_SYSREQS_VERBOSE = TRUE); options(Ncpus = 4, repos = structure(c(devxy = sprintf("https://cran.devxy.io/%s/alpine320/latest", Sys.getenv("ARCH")), CRAN = "https://cloud.r-project.org"))); install.packages("remotes"); remotes::install_deps()'