Skip to content

Commit

Permalink
check alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Oct 10, 2024
1 parent 63e32dd commit 2ac354c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,10 @@ services:
dockerfile: tools/docker/fedora.dockerfile
volumes:
- .:/s2

alpine:
build:
context: .
dockerfile: tools/docker/alpine.dockerfile
volumes:
- .:/s2
12 changes: 12 additions & 0 deletions tools/docker/alpine.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

ARG IMAGE=alpine:latest

FROM ${IMAGE}

RUN apk add bash R R-dev abseil-cpp-dev

# Make sure we can use all cores to install things
RUN mkdir ~/.R && echo "MAKEFLAGS = -j$(nproc)" > ~/.R/Makevars
RUN R -e 'install.packages(c("wk", "bit64", "Rcpp", "testthat"), repos = "https://cloud.r-project.org")'

CMD R CMD INSTALL /s2 --preclean && R -e 'testthat::test_local("/s2")'
6 changes: 2 additions & 4 deletions tools/docker/debian.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ FROM ${IMAGE}

ENV TZ=UTC
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
r-base cmake \
libudunits2-dev libgdal-dev libgeos-dev libproj-dev \
libcurl4-openssl-dev libssl-dev
r-base cmake libcurl4-openssl-dev libssl-dev

# Not all versions of ubuntu/debian have libabsl-dev
RUN apt-get install -y libabsl-dev || true

# Make sure we can use all cores to install things
RUN mkdir ~/.R && echo "MAKEFLAGS = -j$(nproc)" > ~/.R/Makevars
RUN R -e 'install.packages(c("wk", "Rcpp", "testthat"), repos = "https://cloud.r-project.org")'
RUN R -e 'install.packages(c("wk", "bit64", "Rcpp", "testthat"), repos = "https://cloud.r-project.org")'

CMD R CMD INSTALL /s2 --preclean && R -e 'testthat::test_local("/s2")'
2 changes: 1 addition & 1 deletion tools/docker/fedora.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ RUN dnf install -y abseil-cpp-devel || true

# Make sure we can use all cores to install things
RUN mkdir ~/.R && echo "MAKEFLAGS = -j$(nproc)" > ~/.R/Makevars
RUN R -e 'install.packages(c("wk", "Rcpp", "testthat"), repos = "https://cloud.r-project.org")'
RUN R -e 'install.packages(c("wk", "bit64", "Rcpp", "testthat"), repos = "https://cloud.r-project.org")'

CMD R CMD INSTALL /s2 --preclean && R -e 'testthat::test_local("/s2")'

0 comments on commit 2ac354c

Please sign in to comment.