Skip to content

Commit

Permalink
use default docker user
Browse files Browse the repository at this point in the history
  • Loading branch information
bgpalmer committed Aug 6, 2024
1 parent 913f2de commit f7af0a9
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ RUN mkdir -p /usr/local/lib/R/etc/ \
/etc/xdg/sampleDB \
/tmp/sass-cache

# Change ownership to shiny user for necessary directories
RUN chown -R shiny:shiny /srv/shiny-server \
&& chown -R shiny:shiny /usr/local/share/sampleDB \
&& chmod -R 777 /usr/local/share/sampleDB \
&& chown -R shiny:shiny /etc/xdg/sampleDB \
&& chown -R shiny:shiny /var/log/shiny-server \
&& chown -R shiny:shiny /tmp/sass-cache

# Update R configurations
RUN echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl', Ncpus = 4, sass.cache = '/tmp/sass-cache', shiny.port = 3838, shiny.host = '0.0.0.0')" \
| tee /usr/local/lib/R/etc/Rprofile.site \
Expand Down Expand Up @@ -68,7 +60,7 @@ WORKDIR /build_zone
RUN R -e 'remotes::install_local(upgrade="never")'
RUN R -e 'library(sampleDB); SampleDB_Setup(env=TRUE, db=FALSE, server=FALSE)'
WORKDIR /srv/shiny-server
COPY --chown=shiny:shiny ./inst/sampleDB sampleDB
COPY ./inst/sampleDB sampleDB

# Remove the work directory now
RUN rm -rf /build_zone
Expand All @@ -77,6 +69,5 @@ RUN rm -rf /build_zone
ENV SHINY_LOG_STDERR=1

# Run the Shiny app
USER shiny
EXPOSE 3838
CMD ["/usr/bin/shiny-server"]

0 comments on commit f7af0a9

Please sign in to comment.