Skip to content

Instantly share code, notes, and snippets.

@mjul
Created August 9, 2016 14:36
Show Gist options
  • Save mjul/2e6fdefe8343cabb75179dd26fd43885 to your computer and use it in GitHub Desktop.
Save mjul/2e6fdefe8343cabb75179dd26fd43885 to your computer and use it in GitHub Desktop.
Dockerfile for R with extra libraries
FROM r-base
# Install some libraries that we need for the R packages we use
# with git we can use install_github("foo/bar") from R
RUN apt-get update && \
apt-get install -y git libssl-dev libssh2-1-dev libcurl4-openssl-dev
COPY . /usr/local/src/myscripts
WORKDIR /usr/local/src/myscripts
# Run a script to build/install extra R libraries (e.g. quadratic optimization)
RUN Rscript install-libs.R
# Run this when the container starts
CMD ["Rscript", "myDemoScript.R"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment