-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
66 lines (55 loc) · 1.46 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM rocker/r-ver:4.1.0
# Install operating system and R packages
#
# hadolint ignore=DL3008
RUN apt-get update -qq \
&& apt-get install -y --no-install-recommends \
libssl-dev \
libcurl4-gnutls-dev \
# Install curl to download data
curl \
# Install odbc to operate database
unixodbc \
unixodbc-dev \
odbc-postgresql \
# Install R X11 runtime dependencies
#
# Adapted from
# https://github.com/rocker-org/rocker-versioned/blob/dff37a27698cfe8cda894845fa194ecb5f668d84/X11/Dockerfile
libx11-6 \
libxss1 \
libxt6 \
libxext6 \
libsm6 \
libice6 \
xdg-utils \
libxml2 \
&& rm -rf /var/lib/apt/lists/* \
# Install R packages
&& install2.r --error \
tidyverse \
plumber \
rprojroot \
jsonlite \
ggthemes \
odbc \
DBI \
glue \
pheatmap \
ggpubr \
&& rm -rf /tmp/downloaded_packages/*
# Database schema and table names.
ENV BULK_EXP_SCHEMA="bulk_expression"
ENV BULK_EXP_TPM_HISTOLOGY_TBL="bulk_expression_tpm_histology"
ENV BULK_EXP_DIFF_EXP_TBL="bulk_expression_diff_exp"
# R DBI database connection driver name.
ENV DB_DRIVER="PostgreSQL Unicode"
# Run the following commands to run API HTTP server on port 80 as root user, by
# design.
WORKDIR /home/open-ped-can-api-web/
# Copy API server files to docker image WORKDIR
COPY ./main.R .
COPY ./src/ ./src/
COPY ./db/r_interfaces/ ./db/r_interfaces/
EXPOSE 80
ENTRYPOINT ["Rscript", "--vanilla", "main.R"]