Update Dockerfile
Browse files- Dockerfile +21 -12
Dockerfile
CHANGED
|
@@ -1,17 +1,26 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
# Install
|
| 6 |
-
RUN
|
| 7 |
-
ggExtra \
|
| 8 |
-
shiny
|
| 9 |
|
| 10 |
-
#
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
|
|
|
| 14 |
|
| 15 |
-
|
|
|
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the rocker/shiny base image
|
| 2 |
+
FROM rocker/shiny:latest
|
| 3 |
|
| 4 |
+
# Install system dependencies
|
| 5 |
+
RUN apt-get update && apt-get install -y \
|
| 6 |
+
libcurl4-gnutls-dev \
|
| 7 |
+
libssl-dev \
|
| 8 |
+
libxml2-dev
|
| 9 |
|
| 10 |
+
# Install R packages
|
| 11 |
+
RUN R -e "install.packages(c('shiny', 'shinydashboard', 'shinyWidgets', 'ggplot2', 'MASS', 'viridis', 'dplyr', 'httr', 'patchwork'), repos='http://cran.rstudio.com/')"
|
|
|
|
|
|
|
| 12 |
|
| 13 |
+
# Copy the app files into the image
|
| 14 |
+
COPY app.R /srv/shiny-server/
|
| 15 |
+
COPY MLB24T.csv /srv/shiny-server/
|
| 16 |
+
COPY AAA24T.csv /srv/shiny-server/
|
| 17 |
+
COPY FSL24T.csv /srv/shiny-server/
|
| 18 |
|
| 19 |
+
# Make the app files readable
|
| 20 |
+
RUN chmod -R 755 /srv/shiny-server/
|
| 21 |
|
| 22 |
+
# Expose the application port
|
| 23 |
+
EXPOSE 3838
|
| 24 |
+
|
| 25 |
+
# Run the Shiny app
|
| 26 |
+
CMD ["/usr/bin/shiny-server"]
|