FROM rocker/shiny-verse:latest # Create a non-root user to run the application RUN adduser --disabled-password --gecos "" appuser WORKDIR /code # Install stable packages from CRAN RUN install2.r --error \ shiny \ bslib \ httpuv \ purrr \ glue \ httr2 COPY . . # Change the ownership of the /code directory to appuser RUN chown -R appuser:appuser /code # Switch to the appuser user USER appuser CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]