RsShinyProxy not pulling image

RshinyProxy cannot pull 1 image (from dockerhub) while the 2 others are pulled successfully and work correctly. I got the following error :

Status code 500 - Message: Container did not respond in time
Stack Trace:
eu.openanalytics.containerproxy.ContainerProxyException: Container did not respond in time

Full stack can be provided if necessary.

  • The image rocker/shiny is not pulled
  • I have tested rocker/shiny in docker mode, and it works fine with the following command :
docker run --rm -p 32994:3838 -v /data/r_test_sami/:/srv/shiny-server/ -v /data/r_test_sami/:/var/log/shiny-server/ -v /data/r_test_sami/:/data/r_test_sami/ rocker/shiny

Is there something missing or incorrect in application.yml that prevents shinyproxy from pulling the image ?

Content of my 2 files are as follows :

application.yml (01_hello and 06_tabsets work fine and 08_helloworld fails)

proxy:
  title: Open Analytics Shiny Proxy
 # landing-page: /
  port: 8080
  authentication: none
  admin-groups: scientists
  # Example: 'simple' authentication configuration
  users:
  - name: jack
    password: password
    groups: scientists
  - name: jeff
    password: password
    groups: mathematicians
  # Example: 'ldap' authentication configuration
  # Docker configuration
  docker:
    #cert-path: /home/none
    #url: http://localhost:2375
    #port-range-start: 20000
    internal-networking: true
    container-network: udat-net
  specs:
  - id: 01_hello
    display-name: Hello Application
    description: Application which demonstrates the basics of a Shiny app
    #container-cmd: ["R", "-e", "shinyproxy::run_01_hello()"]
    container-image: openanalytics/shinyproxy-demo
    container-network: "${proxy.docker.container-network}"
    access-groups: [scientists, mathematicians]
  - id: 06_tabsets
    display-name: Tab sets
    container-cmd: ["R", "-e", "shinyproxy::run_06_tabsets()"]
    container-image: openanalytics/shinyproxy-demo
    container-network: "${proxy.docker.container-network}"
    access-groups: scientists
  - id: 08_helloworld
    display-name: Hello world
    container-cmd: ["R", "-e", "shiny::runApp('/srv/shiny-server/', host = '0.0.0.0')"]
    container-image: rocker/shiny
    container-network: "${proxy.docker.container-network}"
    access-groups: scientists
    container-volumes: ["/data/r_test_sami/:/srv/shiny-server/"]
    container-volumes: ["/data/r_test_sami/:/var/log/shiny-server/"]
    container-volumes: ["/data/r_test_sami/:/data/r_test_sami/"]
logging:
  file:
    /data/r_test_sami/shinyproxy.log

shinyproxy-docker-compose.yml

version: '2.4'
services:
    shinyproxy:
        container_name: shinyproxy
        image: openanalytics/shinyproxy:2.3.1
        restart: always
        volumes: 
            - /var/run/docker.sock:/var/run/docker.sock
            - ./application.yml:/opt/shinyproxy/application.yml
        user: "0:0"
        privileged: true
        ports: 
            - 35624:8080
        networks:
            - udat-net
networks:
  udat-net:
    name: udat-net

Hi

There is a syntax error in the definition of the 08_helloworld app. You specify the container-volumes property multiple times, while you may only specify it once. You can specify multiple container-volumes like this:

  - id: 08_helloworld
    display-name: Hello world
    container-cmd: ["R", "-e", "shiny::runApp('/srv/shiny-server/', host = '0.0.0.0')"]
    container-image: rocker/shiny
    container-network: "${proxy.docker.container-network}"
    access-groups: scientists
    container-volumes: 
      - "/data/r_test_sami/:/srv/shiny-server/"
      -  "/data/r_test_sami/:/var/log/shiny-server/"
      - "/data/r_test_sami/:/data/r_test_sami/"

Furthermore, when using Docker as containerbackend you have to ensure that the docker image is present on the server running ShinyProxy. E.g. using docker pull rocker/shiny

There were 2 issues :
1) Syntax issue : when specifying more than one volume, hyphens must be used. So correct syntax is :

  - id: 08_helloworld
    display-name: Hello world
    container-cmd: ["/usr/bin/shiny-server"]
    container-image: rocker/shiny
    # container-network: "${proxy.docker.container-network}"
    container-network: udat-net
    container-volumes:
      - "/data/r_test_sami/server/:/srv/shiny-server/"
      -  "/data/r_test_sami/log/:/var/log/shiny-server/"
      - "/data/r_test_sami/data/:/data/r_test_sami/"

2) Incorrect path in container-cmd was not correct (https://hub.docker.com/r/rocker/shiny/dockerfile)

Not correct : /srv/shiny-server/
Correct : /usr/bin/shiny-server

Thank you tdekoninck

@oleg,

Note that there is no need for a Shiny Server installation when using ShinyProxy. The shiny package is enough.

Best,
Tobias