DSM 7.0 R Studio in docker - Can't map shared drive (Docker noob)

Currently reading
DSM 7.0 R Studio in docker - Can't map shared drive (Docker noob)

3
1
NAS
Xpenology on Esxi - DSM 7.0.1
Operating system
  1. macOS
Hi everyone,

I've spent my afternoon trying to figure out how to mount one of my Synology shared drives in R Studio but I just can't seem to get it working.

Here's what I need to do:

I've created a shared folder in DSM called 'rstudio' and would like to be able to share files within this folder with the docker container. I'd like have this be the central repository for all of the R files our team is working on. I'd also at some point like to be able to set up separate accounts and everyone could have access to that folder (not necessary right now however and I'd like to get this working first before I worry about that).

I'm not great with docker compose so I'm just trying to get this set up in the DSM docker package. Right now I've configured the folder as /rstudio: /home/rstudio/r_home but every time I open R Studio and try and open the folder, I get this error:

Screen Shot 2022-05-17 at 3.26.08 PM.png


I have my GID and UID set in the environment settings, so I thought this would allow access to the folder:
Screen Shot 2022-05-17 at 3.27.36 PM.png


I then tried using portainer to build the container. I tried using docker-compose to put the UID and GID in the stack that way but I get the same result. I also tried mounting the folder this way-> /rstudio: /home/rstudio/r_home: z (this didn't work either).

I don't know how to resolve this. I've had containers access shared folders plenty of times in my media server and I've never had issues with permissions like this. I'd greatly appreciate some advice as I feel like I've hit a dead end. I'm also a noob so go easy on me lol.

Thanks in advance.
-- post merged: --

Also, here are the logs when I start the container:
Screen Shot 2022-05-17 at 3.46.17 PM.png
 
Last edited:
Do you mind sharing the dockerhub link to the repo and tag of the image you tried?
While at it, can you please add screenshots of the volume tab and the ports settings tab so we get a lossless picture of what is configured.
-- post merged: --

I have my GID and UID set in the environment settings, so I thought this would allow access to the folder:
General rule of thumb: if something is not mentioned in the description, it is not supported. Unless the entrypoint script of a container has code implement to handle an environment variable... it will have no use.

If you used an image from the rocker/rstudio repo. neither of the variables is mentioned in the description.
 
3
1
NAS
Xpenology on Esxi - DSM 7.0.1
Operating system
  1. macOS
I appreciate the response but I actually was able to solve the issue last night.

The variable in the environment settings must be set as 'GROUPID' and 'USERID' instead of 'PGID' and 'PUID'. It's not on the rocker/rstudio docker hub or GitHub page and every other container I've set up in the past used 'PUID' & 'PGID as the variables. Like I said I am a noob lol, and I haven't set up many containers before so maybe this is somewhat normal but it's something I hadn't seen yet. I thought it was strange however that I couldn't find any documentation specifying this on docker hub/github.

I figured I'd post this just in case someone else has the same problem and maybe they'll find it here.
 
The variable in the environment settings must be set as 'GROUPID' and 'USERID' instead of 'PGID' and 'PUID'. It's not on the rocker/rstudio docker hub or GitHub page
Glad that you found an undocumentet environment varable that did the trick.

UID/GID mapping using environment variables is not a default features of containers. It has to be implemented by the image maintainer - the maintainers of this image choose to give the variables different names.
 
3
1
NAS
Xpenology on Esxi - DSM 7.0.1
Operating system
  1. macOS
Interesting. I'm definitely learning something new everyday while exploring docker & my synology too. Thanks!
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

Correct, J models do not support Docker as a platform.
Replies
2
Views
175
Why would it? phpMyAdmin is neither related to, nor required for Wordpress. The only thing both have in...
Replies
5
Views
187
I thought by now you would have understood that we are discusing about an empty folder used as mountpoint...
Replies
7
Views
197
  • Question
There is a way, but its high likely you won't like it :D It will require you to manage those containers...
Replies
1
Views
121
That's because the compose file tries to build the image itself. Either comment out build: ./php-fpm or...
Replies
4
Views
245
  • Question
You could register it inside Docker UI - Setup a docker registry on Synology
Replies
5
Views
572
Thanks alot! I've mixed these up. I use the Bedrock-edition now and everything works almost instantly!
Replies
17
Views
812

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Top