-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (34 loc) · 1.28 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
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/Appsilon/experimental-fda-submission-4-podman" \
org.opencontainers.image.vendor="Appsilon" \
org.opencontainers.image.authors="André Veríssimo <andre.verissimo@appsilon.com>, Vedha Viyash <vedha@appsilon.com>"
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_DIR=./submissions-pilot2
ARG APP_DIR=/home/shiny/submissions-pilot2
COPY $LOCAL_DIR $APP_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"]