International Rice Research Institute commited on
Update Dockerfile
Browse files- Dockerfile +17 -6
Dockerfile
CHANGED
|
@@ -3,19 +3,28 @@ FROM rocker/r-base:latest
|
|
| 3 |
# Set working directory inside container
|
| 4 |
WORKDIR /code
|
| 5 |
|
| 6 |
-
# Install
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
RUN install2.r --error \
|
| 9 |
-
|
| 10 |
httr \
|
| 11 |
xml2 \
|
| 12 |
rvest \
|
| 13 |
ragg \
|
| 14 |
googledrive \
|
| 15 |
googlesheets4
|
|
|
|
|
|
|
| 16 |
shiny \
|
| 17 |
shinyjs \
|
| 18 |
-
tidyverse \
|
| 19 |
DT \
|
| 20 |
readxl \
|
| 21 |
lme4 \
|
|
@@ -24,12 +33,14 @@ RUN install2.r --error \
|
|
| 24 |
shinywidgets \
|
| 25 |
ggplot2
|
| 26 |
|
|
|
|
|
|
|
|
|
|
| 27 |
# Copy app code and www folder
|
| 28 |
COPY app.R /code/
|
| 29 |
|
| 30 |
-
|
| 31 |
# Expose the port Shiny will run on
|
| 32 |
EXPOSE 7861
|
| 33 |
|
| 34 |
# Run the app
|
| 35 |
-
CMD ["R", "--quiet", "-e", "shiny::runApp('/code', host='0.0.0.0', port=7861)"]
|
|
|
|
| 3 |
# Set working directory inside container
|
| 4 |
WORKDIR /code
|
| 5 |
|
| 6 |
+
# Install system dependencies first
|
| 7 |
+
RUN apt-get update && apt-get install -y \
|
| 8 |
+
libcurl4-openssl-dev \
|
| 9 |
+
libssl-dev \
|
| 10 |
+
libxml2-dev \
|
| 11 |
+
libfreetype6-dev \
|
| 12 |
+
libpng-dev \
|
| 13 |
+
libharfbuzz-dev \
|
| 14 |
+
libfribidi-dev
|
| 15 |
+
|
| 16 |
+
# Install R packages in stages
|
| 17 |
RUN install2.r --error \
|
|
|
|
| 18 |
httr \
|
| 19 |
xml2 \
|
| 20 |
rvest \
|
| 21 |
ragg \
|
| 22 |
googledrive \
|
| 23 |
googlesheets4
|
| 24 |
+
|
| 25 |
+
RUN install2.r --error \
|
| 26 |
shiny \
|
| 27 |
shinyjs \
|
|
|
|
| 28 |
DT \
|
| 29 |
readxl \
|
| 30 |
lme4 \
|
|
|
|
| 33 |
shinywidgets \
|
| 34 |
ggplot2
|
| 35 |
|
| 36 |
+
# Install tidyverse last as it has the most dependencies
|
| 37 |
+
RUN install2.r --error tidyverse
|
| 38 |
+
|
| 39 |
# Copy app code and www folder
|
| 40 |
COPY app.R /code/
|
| 41 |
|
|
|
|
| 42 |
# Expose the port Shiny will run on
|
| 43 |
EXPOSE 7861
|
| 44 |
|
| 45 |
# Run the app
|
| 46 |
+
CMD ["R", "--quiet", "-e", "shiny::runApp('/code', host='0.0.0.0', port=7861)"]
|