moe / Dockerfile
aephidayatuloh
upd dockerfile
d883625
raw
history blame
864 Bytes
FROM rocker/shiny-verse:latest
RUN useradd --create-home appuser
ENV RENV_CONFIG_REPOS_OVERRIDE https://packagemanager.rstudio.com/cran/latest
ENV HOME=/home/appuser
WORKDIR $HOME
# WORKDIR /code
# Install stable packages from CRAN
RUN install2.r --error \
dplyr \
tidyr \
vetiver \
echarts4r \
shiny
# Install development packages from GitHub
RUN installGithub.r \
rstudio/bslib \
rstudio/httpuv
# Create the .cache directory and give appuser permission to write to it
RUN mkdir -p /home/appuser/.cache && chown -R appuser:appuser /home/appuser/.cache
# Create the .cache/pins/url directory and give appuser permission to write to it
RUN mkdir -p /home/appuser/.cache/pins/url && chown -R appuser:appuser /home/appuser/.cache/pins/url
COPY . .
CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]