Update Dockerfile
Browse files- Dockerfile +23 -17
Dockerfile
CHANGED
|
@@ -1,32 +1,38 @@
|
|
| 1 |
FROM rocker/shiny:latest
|
| 2 |
|
| 3 |
-
# Install system dependencies
|
| 4 |
RUN apt-get update && apt-get install -y \
|
| 5 |
libcurl4-openssl-dev \
|
| 6 |
libssl-dev \
|
| 7 |
libxml2-dev \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
# Copy app files into the Shiny Server app directory
|
| 14 |
COPY app.R /srv/shiny-server/app/app.R
|
| 15 |
COPY OA_sheet_for_app.csv /srv/shiny-server/app/OA_sheet_for_app.csv
|
| 16 |
COPY all_players_enriched_multiseason.csv /srv/shiny-server/app/all_players_enriched_multiseason.csv
|
| 17 |
|
| 18 |
-
#
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
| 22 |
-
RUN echo 'run_as shiny;\n\
|
| 23 |
-
server {\n\
|
| 24 |
-
listen 7860;\n\
|
| 25 |
-
location / {\n\
|
| 26 |
-
site_dir /srv/shiny-server/app;\n\
|
| 27 |
-
log_dir /var/log/shiny-server;\n\
|
| 28 |
-
directory_index on;\n\
|
| 29 |
-
}\n\
|
| 30 |
-
}' > /etc/shiny-server/shiny-server.conf
|
| 31 |
|
| 32 |
-
CMD ["/
|
|
|
|
| 1 |
FROM rocker/shiny:latest
|
| 2 |
|
|
|
|
| 3 |
RUN apt-get update && apt-get install -y \
|
| 4 |
libcurl4-openssl-dev \
|
| 5 |
libssl-dev \
|
| 6 |
libxml2-dev \
|
| 7 |
+
libfontconfig1-dev \
|
| 8 |
+
libharfbuzz-dev \
|
| 9 |
+
libfribidi-dev \
|
| 10 |
+
libfreetype6-dev \
|
| 11 |
+
libpng-dev \
|
| 12 |
+
libtiff5-dev \
|
| 13 |
+
libjpeg-dev \
|
| 14 |
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
+
RUN R -e "install.packages(c( \
|
| 17 |
+
'shiny', \
|
| 18 |
+
'shinythemes', \
|
| 19 |
+
'DT', \
|
| 20 |
+
'dplyr', \
|
| 21 |
+
'tidyr', \
|
| 22 |
+
'readr', \
|
| 23 |
+
'plotly', \
|
| 24 |
+
'stringr', \
|
| 25 |
+
'scales', \
|
| 26 |
+
'htmltools' \
|
| 27 |
+
), repos='https://cran.rstudio.com/')"
|
| 28 |
|
|
|
|
| 29 |
COPY app.R /srv/shiny-server/app/app.R
|
| 30 |
COPY OA_sheet_for_app.csv /srv/shiny-server/app/OA_sheet_for_app.csv
|
| 31 |
COPY all_players_enriched_multiseason.csv /srv/shiny-server/app/all_players_enriched_multiseason.csv
|
| 32 |
|
| 33 |
+
RUN echo '#!/bin/bash\ncd /srv/shiny-server/app && Rscript -e "shiny::runApp(\".\", host=\"0.0.0.0\", port=7860)" 2>&1' > /start.sh \
|
| 34 |
+
&& chmod +x /start.sh
|
| 35 |
|
| 36 |
+
EXPOSE 7860
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
+
CMD ["/start.sh"]
|