I have created a R shiny app, which charts analysis results after reading the data from local CSV files.
I am added COPY statements for all files and I am checked the running container, the files are there. But the Shiny app itself is not being able to read the files.
Here is my Dockerfile.
# Base R Shiny image
FROM rocker/shiny
# Make a directory in the container
RUN mkdir /home/shiny-app
RUN mkdir /home/shiny-app/www
WORKDIR /home/shiny-app
# Install R dependencies
RUN R -e "install.packages(c('dplyr', 'ggplot2', 'httr', 'jsonlite', 'readr', 'bayesm', 'callr', 'shinydashboard', 'shinycssloaders', 'data.table', 'scales'))"
# Copy the Shiny app code
COPY app.R /home/shiny-app/app.R
COPY design.csv /home/shiny-app/design.csv
COPY www/* /home/shiny-app/www/
# Expose the application port
EXPOSE 8180
# Run the R Shiny app
CMD Rscript /home/shiny-app/app.R
I am building as:
docker built -t shiny-analysis-app .
I am running as:
docker run --rm -p 8180:8180 shiny-analysis-app
Neither the design.csv file (which contains the data) or the logo files in the www folder are being read. Please tell me what I am doing wrong.