-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (37 loc) · 1.44 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
ARG R_VERSION=4.2.0
ARG IMAGE_REGISTRY=docker.io
ARG IMAGE_ORG=rocker
FROM $IMAGE_REGISTRY/$IMAGE_ORG/r-ver:$R_VERSION
LABEL org.opencontainers.image.licenses="GPL-3.0-or-later" \
org.opencontainers.image.source="https://github.com/RConsortium/submissions-pilot4-container" \
org.opencontainers.image.vendors="RConsortium, Appsilon" \
org.opencontainers.image.authors="Eric Nantz <[email protected]>, André Veríssimo <[email protected]>, Vedha Viyash <[email protected]>"
RUN apt-get update --quiet \
&& apt-get install \
curl \
libssl-dev \
libcurl4-openssl-dev \
libxml2-dev -y --quiet \
libfontconfig1-dev \
libharfbuzz-dev libfribidi-dev \
libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev \
&& apt-get autoremove -y --quiet \
&& apt-get clean --quiet \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m shiny
USER shiny
ARG LOCAL_APP_DIR=./submissions-pilot2
ARG LOCAL_DATA_DIR=./datasets
ARG APP_DIR=/home/shiny/submissions-pilot2
ARG DATA_DIR=/home/shiny/submissions-pilot2/datasets
COPY $LOCAL_APP_DIR $APP_DIR
COPY $LOCAL_DATA_DIR $DATA_DIR
WORKDIR $APP_DIR
# Prevents RENV from mistakenly download from teal.* remotes (as the dependencies are
# already defined in renv.lock).
RUN Rscript \
-e "options(\"renv.config.install.remotes\" = FALSE)" \
-e "renv::restore()"
ARG R_SCRIPT=./entrypoint.R
COPY $R_SCRIPT $APP_DIR/entrypoint.R
CMD ["Rscript", "entrypoint.R"]