rstudio / shiny

Easy interactive web applications with R
https://shiny.posit.co/
Other
5.36k stars 1.87k forks source link

Error in gcloud build docker image #2445

Closed iqbals closed 5 years ago

iqbals commented 5 years ago

Hi, I am trying to deploy a dockerized shiny app. And, having the followiing error (only a part is posted) while creating the image. I am also pasting the Docker file after the error lines:

** libs
g++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG -pthread -I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R/site-library/BH/include" -I/usr/local/include   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG -pthread -I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R/site-library/BH/include" -I/usr/local/include   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c callback_registry.cpp -o callback_registry.o

///// ----
In file included from /usr/local/lib/R/site-library/BH/include/boost/bind/mem_fn.hpp:25:0,
                 from /usr/local/lib/R/site-library/BH/include/boost/mem_fn.hpp:22,
                 from /usr/local/lib/R/site-library/BH/include/boost/bind/bind.hpp:26,
                 from /usr/local/lib/R/site-library/BH/include/boost/bind.hpp:22,
                 from callback_registry.cpp:1:
/usr/local/lib/R/site-library/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
 template<class T> T * get_pointer(std::auto_ptr<T> const& p)
                                        ^~~~~~~~
In file included from /usr/include/c++/6/memory:81:0,
                 from /usr/local/lib/R/site-library/BH/include/boost/config/no_tr1/memory.hpp:21,
                 from /usr/local/lib/R/site-library/BH/include/boost/get_pointer.hpp:14,
                 from /usr/local/lib/R/site-library/BH/include/boost/bind/mem_fn.hpp:25,
                 from /usr/local/lib/R/site-library/BH/include/boost/mem_fn.hpp:22,
                 from /usr/local/lib/R/site-library/BH/include/boost/bind/bind.hpp:26,
                 from /usr/local/lib/R/site-library/BH/include/boost/bind.hpp:22,
                 from callback_registry.cpp:1:
/usr/include/c++/6/bits/unique_ptr.h:49:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
In file included from /usr/local/lib/R/site-library/BH/include/boost/smart_ptr/shared_ptr.hpp:28:0,
                 from /usr/local/lib/R/site-library/BH/include/boost/shared_ptr.hpp:17,
                 from callback_registry.cpp:2:
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/detail/shared_count.hpp:355:33: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
     explicit shared_count( std::auto_ptr<Y> & r ): pi_( new sp_counted_impl_p<Y>( r.get() ) )
                                 ^~~~~~~~
In file included from /usr/include/c++/6/memory:81:0,
                 from /usr/local/lib/R/site-library/BH/include/boost/config/no_tr1/memory.hpp:21,
                 from /usr/local/lib/R/site-library/BH/include/boost/get_pointer.hpp:14,
                 from /usr/local/lib/R/site-library/BH/include/boost/bind/mem_fn.hpp:25,
                 from /usr/local/lib/R/site-library/BH/include/boost/mem_fn.hpp:22,
                 from /usr/local/lib/R/site-library/BH/include/boost/bind/bind.hpp:26,
                 from /usr/local/lib/R/site-library/BH/include/boost/bind.hpp:22,
                 from callback_registry.cpp:1:
/usr/include/c++/6/bits/unique_ptr.h:49:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
In file included from /usr/local/lib/R/site-library/BH/include/boost/shared_ptr.hpp:17:0,
                 from callback_registry.cpp:2:
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/shared_ptr.hpp:256:65: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
 template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R >
                                                                 ^~~~~~~~
In file included from /usr/include/c++/6/memory:81:0,
                 from /usr/local/lib/R/site-library/BH/include/boost/config/no_tr1/memory.hpp:21,
                 from /usr/local/lib/R/site-library/BH/include/boost/get_pointer.hpp:14,
                 from /usr/local/lib/R/site-library/BH/include/boost/bind/mem_fn.hpp:25,
                 from /usr/local/lib/R/site-library/BH/include/boost/mem_fn.hpp:22,
                 from /usr/local/lib/R/site-library/BH/include/boost/bind/bind.hpp:26,
                 from /usr/local/lib/R/site-library/BH/include/boost/bind.hpp:22,
                 from callback_registry.cpp:1:
/usr/include/c++/6/bits/unique_ptr.h:49:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
In file included from /usr/local/lib/R/site-library/BH/include/boost/shared_ptr.hpp:17:0,
                 from callback_registry.cpp:2:
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/shared_ptr.hpp:471:31: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
     explicit shared_ptr( std::auto_ptr<Y> & r ): px(r.get()), pn()
                               ^~~~~~~~
In file included from /usr/include/c++/6/memory:81:0,
                 from /usr/local/lib/R/site-library/BH/include/boost/config/no_tr1/memory.hpp:21,
                 from /usr/local/lib/R/site-library/BH/include/boost/get_pointer.hpp:14,
                 from /usr/local/lib/R/site-library/BH/include/boost/bind/mem_fn.hpp:25,
                 from /usr/local/lib/R/site-library/BH/include/boost/mem_fn.hpp:22,
                 from /usr/local/lib/R/site-library/BH/include/boost/bind/bind.hpp:26,
                 from /usr/local/lib/R/site-library/BH/include/boost/bind.hpp:22,
                 from callback_registry.cpp:1:
/usr/include/c++/6/bits/unique_ptr.h:49:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
In file included from /usr/local/lib/R/site-library/BH/include/boost/shared_ptr.hpp:17:0,
                 from callback_registry.cpp:2:
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/shared_ptr.hpp:484:22: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
     shared_ptr( std::auto_ptr<Y> && r ): px(r.get()), pn()
FROM gcr.io/gcer-public/shiny-googleauthrdemo:latest
MAINTAINER Mark Edmondson (r@sunholo.com)

# install R package dependencies
RUN apt-get update && apt-get install -y \
    ##### ADD YOUR DEPENDENCIES
    libcurl4-gnutls-dev \
    libssl-dev \
    libxml2 \
    libxml2-dev \ 
    libproj-dev \
    libv8-dev \
    gsutil

## Install packages from CRAN
RUN install2.r --error \ 
    -r 'http://cran.rstudio.com' \
    ##### ADD YOUR CRAN PACKAGES
    shiny \
    shinythemes \
    shinyjs\
    shinydashboard \
    readr \
    ggplot2 \
    DT \
    V8 \
    ggrepel \
    shinyWidgets \
    shinycssloaders \
    stringr \
    dplyr \
    plyr \
    tidyr \
    scales \
    ggpubr \
    shinycssloaders \
    plotly \
    ggExtra \
    tm \
    proj4 \
    ggalt \ 
    && rm -rf /tmp/downloaded_packages/ /tmp/*.rds

## copy your shiny app folder below
COPY ./miscastold/ /srv/shiny-server/

Ignoring the error if I creating the VM using the image, then everything works (like the home pages and etc) but the javascripts do not work and also cannot be accessed.

Will highly appreciate if anyone can help with a possible solution.

wch commented 5 years ago

Those are warning messages from (I think) compiling httpuv. However, they are warnings, and not errors, and I don't think they are what is causing the build to fail.

At any rate, this issue tracker is for Shiny, but the problem is not in Shiny itself. I suggest asking the maintainer of the Docker image you are basing yours on, or Stack Overflow, or community.rstudio.com

iqbals commented 5 years ago

Thank you for the suggestion @wch I have contacted the maintainer of the Docker Image.

Best,