-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
30 lines (22 loc) · 856 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Use the rocker/r-ver base image for a more comprehensive R setup
FROM rocker/r-ver:latest
# Metadata as described above
LABEL maintainer="[email protected]" \
version="0.2.0" \
description="Docker image for the ltc R package"
# Set the working directory in docker
WORKDIR /usr/local/src/myscripts
# Copy the current directory contents into the container at /usr/local/src/myscripts
COPY . /usr/local/src/myscripts
# Install system dependencies
RUN apt-get update && apt-get install -y \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
libudunits2-dev
# Install R dependencies
RUN R -e "install.packages(c('dplyr', 'ggplot2', 'ggforce'), repos='http://cran.rstudio.com/')"
# Install the ltc package inside the container
RUN R CMD INSTALL .
# By default, start an R session when the container is run
CMD ["R"]