I have created a Docker image (R-Shiny) and tested it on my PC (Windows10) - via localhost. Everything works great.
But as soon as I load and host my Docker image on my server (Ubuntu) (via Shinyproxy and nginx) I get the error message
"Error
Status code: 500
Message: Container did not respond in time".
What could be the reason that the Docker image works on the PC but not via the public IP of the server?
The Shinyproxy "sample application" works well. You can test it yourself on foundyoung.de Please keep in mind, that this is just a test enviroment. ;)
Thanks and kind regards
Added some details:
Dockerfile:
FROM rocker/r-base:latest
LABEL maintainer="USER <user@example.com>"
RUN apt-get update && apt-get install -y --no-install-recommends \
sudo \
libcurl4-gnutls-dev \
libgtk2.0-dev\
libjq-dev\
xvfb\
xauth\
xfonts-base\
libcairo2-dev \
libxt-dev \
libssl-dev \
libssh2-1-dev \
libxml2-dev \
libmagick++-dev\
openjdk-8-jre-headless\
openjdk-8-jdk\
&& R CMD javareconf\
&& rm -rf /var/lib/apt/lists/*
RUN sed -i 's/name="disk" value="1GiB"/name="disk" value="8GiB"/' /etc/ImageMagick-6/policy.xml
#r-cran-rjava\
RUN install.r shiny
RUN echo "local(options(shiny.port = 3838, shiny.host = '0.0.0.0'))" > /usr/lib/R/etc/Rprofile.site
RUN addgroup --system app \
&& adduser --system --ingroup app app
WORKDIR /home/app
COPY app .
RUN Rscript installPackages.R
RUN chown app:app -R /home/app
USER app
EXPOSE 3838
CMD ["R", "-e", "shiny::runApp('/home/app')"]
application.yml
proxy:
title: ShinyProxy
# logo-url: https://link/to/your/logo.png
landing-page: /
favicon-path: favicon.ico
heartbeat-rate: 10000
heartbeat-timeout: 600000
port: 8080
# Example: 'simple' authentication configuration
# Docker configuration
docker:
cert-path: /home/none
url: http://localhost:2375
port-range-start: 20000
specs:
- id: 01_hello
display-name: Hello Shiny App
description: A simple reactive histogram
container-cmd: ["R", "-e", "shiny::runApp('/home/app')"]
container-image: registry.gitlab.com/analythium/shinyproxy-hello/hello:latest
logo-url: https://github.com/analythium/shinyproxy-1-click/raw/master/digitalocean/images/app-hist.png
- id: 02_hello
display-name: Demo Shiny App
description: App with sliders and large file upload
container-cmd: ["R", "-e", "shiny::runApp('/home/app')"]
container-image: 2007199809022014/container1:container1
logo-url: https://github.com/analythium/shinyproxy-1-click/raw/master/digitalocean/images/app-dots.png
logging:
file:
name: shinyproxy.log
spring:
servlet:
multipart:
max-file-size: 200MB
Server running on Ubuntu 20.04 My PC (where the Docker image is working fine): Windows10, docker testing via localhost:4000) Docker Version: 20.10.7 Open Ports: 22, 80, 443, 9000, 80, 8080, 4000
If u need anything more, just ask!