Skip to content

Commit

Permalink
dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
bergalli committed Apr 19, 2024
1 parent 4a65069 commit 7bb81a5
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM rocker/shiny:4.3.0


# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
libglpk-dev \
&& rm -rf /var/lib/apt/lists/*

RUN addgroup --system shiny \
&& adduser --system --home /home/app --ingroup shiny shiny

# Set the working directory to /home/app
WORKDIR /home/app

# Copy renv stuff
COPY --chown=shiny:shiny .Rprofile renv.lock .renvignore dependencies.R ./
COPY --chown=shiny:shiny renv/activate.R renv/

# Install R dependencies
RUN sudo -u shiny Rscript -e 'renv::restore(clean=TRUE)'

# Copy app
COPY --chown=shiny:shiny app.R ./
COPY --chown=shiny:shiny config.yml ./
COPY --chown=shiny:shiny rhino.yml ./
COPY --chown=shiny:shiny app app/

USER shiny

EXPOSE 3838

CMD ["R", "-e", "shiny::runApp(host='0.0.0.0', port=3838)"]
Binary file modified app/static/.DS_Store
Binary file not shown.
Binary file added app/static/bond_n_loan/.DS_Store
Binary file not shown.

0 comments on commit 7bb81a5

Please sign in to comment.