Hi all,
I have build a Dockerimage with CMD [“R”, “-e”, “rmarkdown::run(file=‘bin/Dashboard_kursnet_ranking.Rmd’, shiny_args = list(port = 3838, host = ‘0.0.0.0’))”]
as last line and as well as put this command in the application.yml. The proxy image runs and I can see the name of my App, however it does not work. I get Error:
This is my flexdashboard dockerfile:
FROM rocker/shiny-verse:latest
MAINTAINER Tim M.Schendzielorz "tim.schendzielorz@googlemail.com"
# Install dependencies
RUN echo 'install.packages(c("dplyr","dbplyr","DBI","DT","plotly","flexdashboard","lubridate"), \
repos="http://cran.us.r-project.org", \
dependencies=TRUE)' > /tmp/packages.R \
&& Rscript /tmp/packages.R
COPY Dashboard_kursnet_ranking.Rmd /bin/Dashboard_kursnet_ranking.Rmd
# make all app files readable (solves issue when dev in Windows, but building in Ubuntu)
RUN chmod -R 755 /bin
EXPOSE 3838
CMD ["R", "-e", "rmarkdown::run(file='bin/Dashboard_kursnet_ranking.Rmd', shiny_args = list(port = 3838, host = '0.0.0.0'))"]
This is my application.yml file:
title: proxy_dashboards
hide-navbar: false
landing-page: /
port: 3838
docker:
internal-networking: true
specs:
- id: 01_kursnet_dashboard
display-name: Kursnet Dashboard
description:
container-cmd: ["R", "-e", "rmarkdown::run(file='root/Dashboard_kursnet_ranking.Rmd', shiny_args = list(port = 3838, host = '0.0.0.0'))"]
container-image: kursnetdashboard
container-network: kt-net
container-env:
user: "shiny"
environment:
- APPLICATION_LOGS_TO_STDOUT=false
logging:
file:
shinyproxy.log
EDIT: I start the shiny proxy docker container with:
docker run -d -v /var/run/docker.sock:/var/run/docker.sock --net kt-net -p 3838:3838 shiny_proxy
I included the test shiny app from shiny proxy in the application.yml. This test app works fine when I access it via localhost:3838:
- id: 02_test
display-name: test
description: Application which demonstrates the basics of a Shiny app
container-cmd: ["R", "-e", "shinyproxy::run_06_tabsets()"]
container-image: openanalytics/shinyproxy-demo
container-network: kt-net