When running my container it listens on the wrong host. I have other shiny apps that are working but when I try to run this one it reports that it is listening on http://127.0.0.1:6479
when it should say that it is listening on http://0.0.0.0:3838
. I am building my image from the Dockerfile below and then running a container with docker run -p 3839:3838 --rm db/my_app R -e "shiny::runApp('/root/app/')"
.
Presumably, this explains the issue I am having where my container is reporting back unresponsive.
Dockerfile:
FROM openanalytics/r-base
MAINTAINER Daniel Beachnau "my_real_email@email.com"
# system libraries of general use
RUN apt-get update && apt-get install -y \
sudo \
gdebi-core \
pandoc \
pandoc-citeproc \
libcurl4-gnutls-dev \
libcairo2-dev \
libxt-dev \
libssl-dev \
gsl-bin \
libgsl0-dev \
libxml2-dev \
texlive-latex-base \
texlive-fonts-recommended \
texlive-fonts-extra \
texlive-latex-extra \
libmariadb-client-lgpl-dev
# basic shiny functionality
RUN R -e "install.packages(c('shiny', 'shinydashboard', 'shinythemes', 'devtools', 'tinytex','shinyWidgets','shinycssloaders','shinyBS','shinyjs','flexdashboard'), repos='https://cran.rstudio.com/')"
# install dependencies of the app
RUN R -e "devtools::install_github('hadley/ggplot2')"
RUN R -e "devtools::install_version('rmarkdown', version = '1.8', repos = 'http://cran.us.r-project.org')"
RUN R -e "install.packages(c('ggthemes','ggrepel','plyr','dplyr','plotly','scales','RColorBrewer','plotly','tidyr','RMySQL', 'numbers', 'lubridate', 'stringr', 'rlang', 'reshape2','jsonlite', 'knitr', 'kableExtra', 'gridExtra', 'xts', 'dygraphs'), repos='https://cran.rstudio.com/')"
RUN R -e "install.packages(c('RMySQL'), repos='https://cran.rstudio.com/')"
# copy the app to the image
RUN mkdir /root/app
COPY app /root/app
COPY Rprofile.site /usr/lib/R/etc/
EXPOSE 3838
CMD ["R", "-e", "shiny::runApp('/root/app', host='0.0.0.0', port=3838)"]
Any help would be greatly appreciated.