Add Shiny server to Docker rstudio container

Documentation for rocker/rstudio docker container.

I am able to get up and running in rstudio using Docker with the following set up in a directory:

Dockerfile:

FROM rocker/tidyverse:latest

docker-compose:

version: "3.5"
services:
  ide-rstudio:
    build:
      context: .
    ports:
      - 8787:8787
    environment:
      ROOT: "TRUE"
      PASSWORD: test

Now, if I enter this dir in the terminal and type: docker-compose build followed by docker-compose up -d and then navigate to localhost:8787 I see the rstudio login screen. So far so good.

I would like to add shiny to the same container per the documentation (as opposed to using a separate shiny image).

On the documentation I link to at the top it says:

Add shiny server on start up with e ADD=shiny

docker run -d -p 3838:3838 -p 8787:8787 -e ADD=shiny -e PASSWORD=yourpasswordhere rocker/rstudio
shiny server is now running on localhost:3838 and RStudio on localhost:8787.

Since I'm using docker-compose I updated my docker-compose file to this:

version: "3.5"
services:
  ide-rstudio:
    build:
      context: .
    ports:
      - 8787:8787
      - 3838:3838
    environment:
      ROOT: "TRUE"
      ADD: "shiny"
      PASSWORD: test

Now, when I go to the terminal like before and type: docker-compose build followed by docker-compose up -d I again see the rstudio login page at localhost:8787. However, if I go to localhost:3838, I see Firefox' 'connection was reset' page. It looks like nothing is there.

How can I add shiny to my container per the instructions?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.