Cannot get container volume to mount

Hi there,
I am trying to get my app to work after making a few updates. I think there might be a problem with the container volume mounting. I have tested the app with:
sudo docker run -p 3838:3838 my/app
In this case, it fails to read files because it does not have access to the container volume.

With the docker volume added in, it runs:
sudo docker run -p 3838:3838 -v /usr/share/app1:/mnt my/app

Is it likely that this is the reason it is not working online with shinyproxy?

Many thanks for any pointers, I am stuck!
Will

Just to provide more context, my ‘application.yml’ contains the following section for the app. I still have no idea why it is now not working, when it once did:

specs:
- id: app
  container-image: my/app
  container-volumes: [ "/usr/share/app1:/mnt" ]

I tried to use chown to get the shinyproxy user to own the host folder, but it didn’t make any difference…
chown -R shinyproxy /usr/share/app1

This host /usr/share/app1 folder contains a subfolder called data where I have placed RDS and csv files that are regularly updated. Am I doing something stupid with my shiny app code or Ubuntu 18.04 itself?

In the app, I have been trying:
setwd('/mnt')
dat <- fread('./data/dat.rds')

I don’t know the direct answer, but maybe I’ll point you in the right direction.
What kind of error are you getting? Is the container app starting at all?
Have you checked whether mnt directory is visible at all inside app container?
If you are running ShinyProxy also as a container, then maybe the reason is that path specified in application.yml means path inside ShinyProxy host?

It seems that it was something to do with relative paths in my R script.
I was using…
setwd('/mnt')
dat <- fread('./data/dat.rds')

I changed it to the following, and it worked!
dat <- fread('/mnt/data/dat.rds')

I’m not sure why, as I had previously used the first approach and it had worked fine.

Will