Skip to content

Commit

Permalink
Update base R image.
Browse files Browse the repository at this point in the history
The `as.POSIXct.numeric` function was relaxed a bit in R 4.3.0 and made
its "origin" parameter optional, and we need that feature.

For some reason the dependency installation was failing. Using `pak`
seems to fix it. pak is generally a bit faster and more reliable anyway.
  • Loading branch information
plietar committed Jan 14, 2025
1 parent 18e0546 commit d6557fc
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,15 @@
FROM rocker/r-ver:4.1
FROM rocker/r-ver:4.4

RUN apt-get update && apt-get install -y --no-install-recommends \
git \
libcurl4-openssl-dev \
libhiredis-dev \
libssl-dev \
zlib1g-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN install2.r pak

# Without this, we are unable to pick up more recent packages
COPY docker/Rprofile.site /usr/local/lib/R/etc/Rprofile.site

COPY DESCRIPTION /tmp/DESCRIPTION

RUN install2.r --error remotes && \
Rscript -e 'remotes::install_deps("/tmp")'
COPY DESCRIPTION /src/DESCRIPTION
RUN Rscript -e "pak::local_install_deps('/src')"

COPY . /src
RUN R CMD INSTALL --install-tests /src && rm -rf /src
RUN Rscript -e "pak::local_install('/src')"

COPY docker/bin /usr/local/bin/

RUN git config --global --add safe.directory "*"
RUN echo ".packit" > /.gitignore
RUN git config --global core.excludesFile "/.gitignore"
Expand Down

0 comments on commit d6557fc

Please sign in to comment.