Spaces:
Runtime error
Runtime error
Commit
·
6946818
1
Parent(s):
f13fc67
add user
Browse files- Dockerfile +6 -5
Dockerfile
CHANGED
@@ -1,9 +1,12 @@
|
|
1 |
# Generated by the vetiver package; edit with care
|
2 |
|
3 |
FROM rocker/r-ver:4.3.1
|
|
|
|
|
|
|
4 |
ENV RENV_CONFIG_REPOS_OVERRIDE=https://packagemanager.rstudio.com/cran/latest
|
5 |
-
ENV HOME=/home
|
6 |
-
WORKDIR
|
7 |
|
8 |
RUN apt-get update -qq && apt-get install -y --no-install-recommends \
|
9 |
libcurl4-openssl-dev \
|
@@ -15,9 +18,7 @@ RUN apt-get update -qq && apt-get install -y --no-install-recommends \
|
|
15 |
&& apt-get clean
|
16 |
|
17 |
COPY vetiver_renv.lock renv.lock
|
18 |
-
COPY pins-r /
|
19 |
-
# Change ownership of the 'pins-r' directory
|
20 |
-
RUN chown -R root:root /home/pins-r
|
21 |
|
22 |
RUN Rscript -e "install.packages('renv')"
|
23 |
RUN Rscript -e "renv::restore()"
|
|
|
1 |
# Generated by the vetiver package; edit with care
|
2 |
|
3 |
FROM rocker/r-ver:4.3.1
|
4 |
+
# Create a non-root user to run the application
|
5 |
+
RUN useradd --create-home appuser
|
6 |
+
|
7 |
ENV RENV_CONFIG_REPOS_OVERRIDE=https://packagemanager.rstudio.com/cran/latest
|
8 |
+
ENV HOME=/home/appuser
|
9 |
+
WORKDIR $HOME
|
10 |
|
11 |
RUN apt-get update -qq && apt-get install -y --no-install-recommends \
|
12 |
libcurl4-openssl-dev \
|
|
|
18 |
&& apt-get clean
|
19 |
|
20 |
COPY vetiver_renv.lock renv.lock
|
21 |
+
COPY pins-r $HOME/pins-r
|
|
|
|
|
22 |
|
23 |
RUN Rscript -e "install.packages('renv')"
|
24 |
RUN Rscript -e "renv::restore()"
|