forked from OHDSI/Achilles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (35 loc) · 1012 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# A Docker container to run the OHDSI/Achilles analysis tool
FROM r-base:3.1.2
MAINTAINER Aaron Browne <brownea@email.chop.edu>
# Remove Debain 'jessie' package pinning by r-base.
RUN echo '' > /etc/apt/apt.conf.d/default
# Install java and clean up.
RUN apt-get update && \
apt-get install -y \
libssl-dev \
libcurl4-openssl-dev \
libxml2-dev \
openjdk-7-jdk \
&& rm -rf /var/lib/apt/lists/* \
&& R CMD javareconf
# Install Achilles requirements
RUN install2.r --error \
devtools \
httr \
rjson \
&& installGithub.r \
OHDSI/SqlRender \
OHDSI/DatabaseConnector \
&& rm -rf /tmp/downloaded_packages/ /tmp/*.rds
# Configure workspace
WORKDIR /opt/app
ENV PATH /opt/app:$PATH
VOLUME /opt/app/output
# Add project files to container
COPY . /opt/app/
RUN chmod +x /opt/app/docker-run
# Install Achilles from source
RUN R CMD INSTALL /opt/app \
&& rm -rf /tmp/downloaded_packages/ /tmp/*.rds
# Define run script as default command
CMD ["docker-run"]