-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
50 lines (40 loc) · 1.2 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
FROM r-base
# system libraries of general use
## install debian packages
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
libxml2-dev \
libcairo2-dev \
libsqlite3-dev \
libmariadbd-dev \
libpq-dev \
libssh2-1-dev \
unixodbc-dev \
libcurl4-openssl-dev \
libssl-dev
## update system libraries
RUN apt-get update && \
apt-get upgrade -y && \
apt-get clean
## renv.lock file
# COPY /example-app/renv.lock ./renv.lock
# install renv & restore packages
RUN Rscript -e 'install.packages("renv")'
RUN Rscript -e 'install.packages("shiny")'
RUN Rscript -e 'install.packages("ggplot2")'
RUN Rscript -e 'install.packages("Seurat")'
RUN Rscript -e 'install.packages("ggplot2")'
RUN Rscript -e 'install.packages("dplyr")'
RUN Rscript -e 'install.packages("markdown")'
RUN Rscript -e 'install.packages("tidyr")'
RUN Rscript -e 'renv::consent(provided = TRUE)'
RUN Rscript -e 'renv::restore()'
RUN Rscript -e 'memory.limit(size=20000)'
# copy necessary files
## app folder
COPY app.R /app.R
COPY Keller_more_clusterings.rds /Keller_more_clusterings.rds
COPY README.md /README.md
# run app on container start
CMD ["Rscript", "-e", "shiny::runApp('/app.R', host = '0.0.0.0', port = 3838)"]
# expose port
EXPOSE 3838