generated from movestore/Template_R_Shiny_App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (25 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
########################################################################################################################
# MoveApps R-SHINY SDK
########################################################################################################################
FROM rocker/geospatial:4.3.2
LABEL maintainer = "couchbits GmbH <us@couchbits.com>"
# Security Aspects
# group `staff` b/c of:
# When running rocker with a non-root user the docker user is still able to install packages.
# The user docker is member of the group staff and could write to /usr/local/lib/R/site-library.
# https://github.com/rocker-org/rocker/wiki/managing-users-in-docker
RUN useradd --create-home --shell /bin/bash moveapps --groups staff
USER moveapps:staff
WORKDIR /home/moveapps/co-pilot-r
# copy the SDK
COPY --chown=moveapps:staff src/ ./src/
COPY --chown=moveapps:staff data/ ./data/
COPY --chown=moveapps:staff www/ ./www/
COPY --chown=moveapps:staff sdk.R ShinyModule.R .env start-process.sh ./
# restore the current snapshot via renv
COPY --chown=moveapps:staff renv.lock .Rprofile ./
COPY --chown=moveapps:staff renv/activate.R renv/settings.dcf ./renv/
RUN R -e 'renv::restore()'
# shiny port
EXPOSE 3838
ENTRYPOINT ["/bin/bash"]