Skip to content

Commit

Permalink
Added specific packages and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Lextuga007 committed Jun 14, 2024
1 parent d22320d commit 25c7218
Showing 1 changed file with 54 additions and 14 deletions.
68 changes: 54 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,73 @@ FROM rocker/r-ubuntu:22.04

ADD Rprofile.site /usr/lib/R/etc/Rprofile.site

# https://github.com/jlacko/RCzechia/blob/master/data-raw/Dockerfile
# for GDAL use
RUN apt-get update && apt-get -y install libexpat-dev

# for GEOS use
RUN apt-get update && apt-get -y install libsqlite3-dev

# the big three - cruel & unusual versions from source (takes about forever; should be on top of the dockerfile)

RUN apt-get update \
&& apt-get upgrade -y

RUN wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.4.550/quarto-1.4.550-linux-amd64.deb \
&& DEBIAN_FRONTEND=noninteractive apt install ./quarto-*-linux-amd64.deb \
&& rm quarto-*-linux-amd64.deb

# stuff for the tmaptools/rmapshaper/geojsonio etc stack:
RUN apt-get install -y libv8-3.14-dev libprotobuf-dev protobuf-compiler libcairo2-dev
RUN add-apt-repository -y ppa:opencpu/jq
RUN apt-get update
RUN apt-get install -y libjq-dev
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN Rscript -e 'install.packages(c("sf", "lwgeom", "covr", "raster"), dependencies = TRUE, repos = "https://cloud.r-project.org")'
RUN git clone https://github.com/r-spatial/sf.git
RUN R CMD build --no-build-vignettes sf
RUN R CMD INSTALL sf_*tar.gz
RUN R -q -e 'install.packages("remotes"); remotes::install_github("rundel/checklist")'

RUN apt-get install -y pandoc pandoc-citeproc
# PROJ
RUN cd \
&& wget http://download.osgeo.org/proj/proj-4.9.3.tar.gz \
&& tar zxvf proj-4.9.3.tar.gz \
&& cd proj-4.9.3/ \
&& ./configure \
&& make -j $(nproc) \
&& make install

RUN R CMD check --as-cran sf_*tar.gz
# GDAL
RUN cd \
&& wget http://download.osgeo.org/gdal/2.2.3/gdal-2.2.3.tar.gz \
&& tar zxvf gdal-2.2.3.tar.gz \
&& cd gdal-2.2.3 \
&& ./configure \
&& make -j $(nproc) \
&& make install

# GEOS
RUN cd \
&& wget http://download.osgeo.org/geos/geos-3.6.2.tar.bz2 \
&& bunzip2 geos-3.6.2.tar.bz2 \
&& tar xvf geos-3.6.2.tar \
&& cd geos-3.6.2 \
&& ./configure \
&& make -j $(nproc)\
&& make install

RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# other required packages; standard versions suffice...
# absolutely positively required on a single line (bo update a instal must be in the same keš)
RUN apt-get update && apt-get -y install libudunits2-dev
RUN apt-get update && apt-get -y install libxml2-dev
RUN apt-get update && apt-get -y install libv8-dev
RUN apt-get update && apt-get -y install libjq-dev
RUN apt-get update && apt-get -y install libprotobuf-dev
RUN apt-get update && apt-get -y install protobuf-compiler
RUN apt-get update && apt-get -y install libxtst6
RUN apt-get update && apt-get -y install libfontconfig1-dev
RUN apt-get update && apt-get -y install libharfbuzz-dev
RUN apt-get update && apt-get -y install libfribidi-dev
RUN apt-get update && apt-get -y install libfreetype6-dev
RUN apt-get update && apt-get -y install libpng-dev
RUN apt-get update && apt-get -y install libtiff5-dev
RUN apt-get update && apt-get -y install libjpeg-dev
RUN ldconfig

RUN R -q -e 'install.packages("remotes"); remotes::install_github("rundel/checklist")'

CMD ["bash"]

0 comments on commit 25c7218

Please sign in to comment.