rocker-org / rocker

R configurations for Docker
https://rocker-project.org
GNU General Public License v2.0
1.45k stars 273 forks source link

Place a custom `user-settings` file during derivative container build? #407

Closed r-cheologist closed 4 years ago

r-cheologist commented 4 years ago

I'm basing my devel environment container(s) on your EXCELLENT work like so:

FROM rocker/tidyverse

In the process I am attempting to place my favorite rstudio-server parameters in the image like so:

COPY ./user-settings /home/rstudio/.rstudio/monitored/user-settings/user-settings

but that fails - when starting a container based on that image, the settings are lost/not present.

How to fix that?

Sincerely, Joh

cboettig commented 4 years ago

Thanks for the bug report. I'm a bit unclear: is the file you copied present on the image, but the settings are not applied, or is the fie missing all-together? I'm guessing it might be the former -- note that we run the current release of RStudio, 1.3, in which I believe dotfiles are now located under ~/.config/rstudio, e.g. see https://blog.rstudio.com/2020/02/18/rstudio-1-3-preview-configuration/

r-cheologist commented 4 years ago

First: Hmm. I just pulled rocker/tidyverse yesterday and am running RStudio 1.2.5042. ... why am I out of sync?

Second: You are right - close investigation (diffing) implies it is there BUT it has incorrect ownership (root) as well as access rights (600 rather than 644) - fixing that makes it work ... so

COPY --chown=rstudio:rstudio ./user-settings /home/rstudio/.rstudio/monitored/user-settings/user-settings

should fix one issue and chmoding the source file to 644 the other ... I'm testing.

r-cheologist commented 4 years ago

HA! I'm pulling rocker/tidyverse:3.6.3 - I suppose that's why I'm out of sync.

r-cheologist commented 4 years ago

OK. Those fixes (chown in the COPY stanza & chmoding the source file) solved my issues.

Sorry for the noise and thank you for your guiding counsel as well as pointing out the configuration changes in rstudio-server.