qtl / Dockerfile
softwareDevelopment's picture
Update Dockerfile
a5caafc verified
Raw History Blame
1.6 kB
FROM rocker/shiny:latest
# Set working directory inside container
WORKDIR /code
# Install system dependencies
RUN apt-get update && apt-get install -y \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
libnlopt-dev \
libicu-dev \
libgdal-dev \
libgeos-dev \
libproj-dev \
libv8-dev \
libnode-dev \
libglpk-dev \
libglpk40 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install pak and remotes first (needed for GitHub installs)
RUN install2.r --error remotes pak
# Install htmlwidgets and related dependencies
RUN install2.r --error \
htmltools \
htmlwidgets \
jsonlite \
crosstalk \
magrittr \
promises \
ellmer \
shinychat \
text2vec \
Matrix \
shinydashboard \\
# Install main packages
RUN install2.r --error \
nloptr \
lme4 \
emmeans \
readxl \
plotly \
shinyjs \
shinyWidgets \
DT \
RColorBrewer \
ggrepel \
openxlsx \
randomForest \
caret \
qtl \
writexl \
viridis \
devtools \
tidyverse \
igraph \
vcfR \
poppr \
reshape2
# Install packages from GitHub using pak (modern replacement for devtools::install_github)
RUN R -e "pak::pak('cran/qtlDesign')" \
&& R -e "pak::pak('jtlovell/qtlTools')"
# Create www directory and health file
RUN mkdir -p /code/www && echo "OK" > /code/www/health
# Copy app code
COPY app.R /code/
# Expose the port Shiny will run on
EXPOSE 7860
# Run the app
CMD ["R", "--quiet", "-e", "shiny::runApp('/code', host='0.0.0.0', port=7860)"]