-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 1.27 KB
/
Dockerfile
File metadata and controls
31 lines (24 loc) · 1.27 KB
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
# =============================================================================
# BASE IMAGE OPTIONS
# =============================================================================
# Option A: Full runtime (default) - larger image, most dependencies included
FROM tercen/runtime-r44:4.4.3-8
# Option B: Minimal runtime - smaller image, faster pulls
# Uncomment the lines below and comment out Option A above to use minimal image
# FROM tercen/runtime-r44-minimal:4.4.3-2
# RUN apk update && apk add --no-cache \
# gcc g++ musl-dev make gfortran \
# curl-dev openssl-dev git pkgconfig
# # Uncomment if your R packages have Rust dependencies (e.g., stringi, gifski):
# # cargo rust
# # Uncomment if installing R packages from GitHub that require compilation:
# # build-base linux-headers libxml2-dev
COPY . /operator
WORKDIR /operator
# Tercen runs operators as UID 1000; default /root/.cache is unreadable.
ENV RENV_PATHS_CACHE=/operator/.cache/renv
RUN R -e "renv::consent(provided = TRUE); renv::restore(confirm = FALSE)"
RUN chown -R 1000:1000 /operator
ENV TERCEN_SERVICE_URI https://tercen.com
ENTRYPOINT ["R", "--no-save", "--no-restore", "--no-environ", "--slave", "-f", "main.R", "--args"]
CMD ["--taskId", "someid", "--serviceUri", "https://tercen.com", "--token", "sometoken"]