gesistsa / rang

🐶 (Re)constructing R computational environments
https://gesistsa.github.io/rang/
GNU General Public License v3.0
79 stars 3 forks source link

Using ENV in the Dockerfile #125

Closed chainsawriot closed 1 year ago

chainsawriot commented 1 year ago

It would make #110 easier to implement.

FROM rocker/r-ver:4.2.2
ENV RANG_PATH rang.R
ENV CACHE_PATH ""
COPY rang.R ./rang.R
RUN apt-get update -qq && apt-get install -y libpcre3-dev zlib1g-dev pkg-config libcurl4-openssl-dev && apt-get install -y libicu-dev libxml2-dev make pandoc zlib1g-dev
RUN Rscript $RANG_PATH
RUN apt-get install -y curl git && \
curl -LO https://quarto.org/download/latest/quarto-linux-amd64.deb && \
dpkg -i quarto-linux-amd64.deb && \
quarto install tool tinytex && \
CMD ["R"]

For example, we can set RANG_PATH to "inst/rang/rang.R"