1

I have a shinyproxy server set up with two apps. One of this apps has the following code to access the files:

volumes = getVolumes()
volumes <- c(Home = fs::path_home(), "R Installation" = R.home(), getVolumes()())

file_selected <- reactive({
 shinyFileChoose(input, "file", roots = volumes, session = session)
 req(input$file)
 if (is.null(input$file))
   return(NULL) 
 #print(parseFilePaths(volumes, input$file)$datapath)
 return(parseFilePaths(volumes, input$file)$datapath)
})   

However this mapping does not work on the client side. This app is containerized in a docker, and when I click the file.selected button I can only see the files inside the docker. Is there any way to see the files in the client side?

For example, I am a user that type the server address xx:xx:xx:xx:8080 on my computer to access my app. When it loads, is there any way to see the files on my computer (locally)?

I know that with fileInput I can use browser file listing capabilities but I also need the full path of the file, and as far as I know fileInput only stores a temporary datapath

Thanks

user2380782
  • 1,542
  • 4
  • 22
  • 60

1 Answers1

0

You only see the files inside the docker because docker container does not know anything about your host file system. You should share volume while running docker app.

Running with volume share by using -v tag.

Let's say you need to access the desktop folder of your host. You should make the folder available in the Docker container like this:

docker run -d -p ExtPORThere:IntPORThere -v yourDesktopPath:aPATHinContainer YOURimageHere

nPcomp
  • 8,637
  • 2
  • 54
  • 49
  • Thanks a lot for the answer @nPcomp, but what I would like to know if it is possible to mount the folder on the client-side, not the host filesystem, i.e, remotely – user2380782 Jun 24 '19 at 10:38