Skip to content

Commit

Permalink
Dockerfile: install into site-library
Browse files Browse the repository at this point in the history
This is a pattern that works if the package has any
dependencies.

[ci skip]
  • Loading branch information
gaborcsardi committed Sep 12, 2024
1 parent 60dca0e commit c1305e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ FROM ghcr.io/r-hub/r-minimal/r-minimal:release AS build

COPY . /root/nanoparquet

RUN mkdir -p /usr/local/lib/R/site-library

RUN installr -d local::/root/nanoparquet

FROM ghcr.io/r-hub/r-minimal/r-minimal:release AS final

COPY --from=build /usr/local/lib/R/library/nanoparquet /usr/local/lib/R/library/nanoparquet
COPY --from=build /usr/local/lib/R/site-library /usr/local/lib/R/site-library

RUN R -q -e 'library(nanoparquet); write_parquet(mtcars, "/tmp/mtcars.parquet"); read_parquet("/tmp/mtcars.parquet")' && \
rm -rf /tmp/Rtmp*

0 comments on commit c1305e5

Please sign in to comment.