I have some trouble dockerizing a Shiny app. The problem comes from the dockerization of the package ggvis. Here is a minimal example.
The shiny app:
library(shiny)
library(ggvis)
df<-iris
ui <- fluidPage(
textOutput("size"),
br(),
ggvisOutput("cloudPoint"),
)
server <- function(input, output, session) {
output$size <- renderText({
nrow(df)
})
output$cloudPoint <- reactive({
df %>%
ggvis::ggvis(~Sepal.Length,~Sepal.Width)%>%
bind_shiny("cloudPoint")
})
}
shinyApp(ui, server)
When I run it, I get the following app with the ggvis visualisation and a textOutput of the number of rows of the dataframe (150):
Here is the dockerfile:
FROM rocker/shiny-verse
RUN R -e "install.packages(c('ggvis'))"
COPY /shinyapp/ /srv/shiny-server/
Now, when I dockerize it and open the container in my browser I get the following application without the textOutput 150:
Do you have any idea about the problem ? Thank you very much for your help !


I have found a solution by changing the parent image in the first line of the Dockerfile
FROM rocker/shiny-versebyFROM rocker/shiny:4.0.5.Remark that with the parent image
FROM rocker/shiny:latestit doesn't work.