aephidayatuloh
commited on
Commit
·
d883625
1
Parent(s):
b117b18
upd dockerfile
Browse files- Dockerfile +12 -1
Dockerfile
CHANGED
|
@@ -1,6 +1,12 @@
|
|
| 1 |
FROM rocker/shiny-verse:latest
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
# Install stable packages from CRAN
|
| 6 |
RUN install2.r --error \
|
|
@@ -15,6 +21,11 @@ RUN installGithub.r \
|
|
| 15 |
rstudio/bslib \
|
| 16 |
rstudio/httpuv
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
COPY . .
|
| 19 |
|
| 20 |
CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]
|
|
|
|
| 1 |
FROM rocker/shiny-verse:latest
|
| 2 |
|
| 3 |
+
RUN useradd --create-home appuser
|
| 4 |
+
|
| 5 |
+
ENV RENV_CONFIG_REPOS_OVERRIDE https://packagemanager.rstudio.com/cran/latest
|
| 6 |
+
ENV HOME=/home/appuser
|
| 7 |
+
WORKDIR $HOME
|
| 8 |
+
|
| 9 |
+
# WORKDIR /code
|
| 10 |
|
| 11 |
# Install stable packages from CRAN
|
| 12 |
RUN install2.r --error \
|
|
|
|
| 21 |
rstudio/bslib \
|
| 22 |
rstudio/httpuv
|
| 23 |
|
| 24 |
+
# Create the .cache directory and give appuser permission to write to it
|
| 25 |
+
RUN mkdir -p /home/appuser/.cache && chown -R appuser:appuser /home/appuser/.cache
|
| 26 |
+
# Create the .cache/pins/url directory and give appuser permission to write to it
|
| 27 |
+
RUN mkdir -p /home/appuser/.cache/pins/url && chown -R appuser:appuser /home/appuser/.cache/pins/url
|
| 28 |
+
|
| 29 |
COPY . .
|
| 30 |
|
| 31 |
CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]
|