rocker-org / rocker-versioned

Run current & prior versions of R using docker
https://hub.docker.com/r/rocker/r-ver
GNU General Public License v2.0
297 stars 169 forks source link

Unexpected version of R in rocker/ #9

Closed nickforr closed 7 years ago

nickforr commented 7 years ago

Took a copy of rstudio dockerfile from here https://github.com/rocker-org/rocker-versioned/blob/master/rstudio/Dockerfile and built locally (docker build -t rstudio .), saw docker pulling image for rocker/r-ver:latest (Pulling from rocker/r-ver). Then running docker container using docker run -d -p 8787:8787 rstudio which lets me access rstudio on localhost:8787 but the version of R that subsequently appears in rstudio is 3.1.1

cboettig commented 7 years ago

Sorry, trying to work around what I think is a bug in RStudio, see https://support.rstudio.com/hc/en-us/community/posts/245035627-RStudio-erroneously-asks-to-install-build-tools-when-they-are-already-installed?page=1#community_comment_248498227. For some reason RStudio uses the older /usr/bin/R instance instead of the newer /usr/local/bin/R, despite the default order given by the path.

nickforr commented 7 years ago

Ah, thanks. If I run bash in the container I do see the expected version of R (and a separate docker container that builds shiny-server on top of the rocker/verse container seems to work ok).

cboettig commented 7 years ago

Okay, I think I've found a solution. I've removed r-base-core since we don't want that old version around; and I've just symlinked ln -s /usr/local/lib/R /usr/lib/R and ln -s /usr/local/bin/R /usr/bin/R and that seems to resolve both the weird RStudio error about refusing to install packages that have source-code and the version error. Might take a bit for it to build on the hub and propagate through, but should resolve this.

Thanks @nickforr and @kevinushey for pointing out the R version change which gave me the idea to just use the symlink; hope this is a more viable fix without unintended side effects.

cboettig commented 7 years ago

Closing since I think this should now be resolved in the current images.