Closed lwaldron closed 4 years ago
can you figure out what in the docker file is causing the problem? That docker file is only slightly different from the way you are executing it that works... try taking out the --workdir or the --env variables and see if it's one of those things
just running that docker command directly to test will work
could also be the --init
?
By the way, that docker command works correctly for me; rstudioserver is loaded and authenticates correctly.
This seems hard to believe, but the only thing I have to remove to avoid the network error is:
--volume "/tmp:/tmp" \
So a working rstudio-server file looks like this:
#!/bin/sh
docker run --rm --init \
--volume=/Users/lwaldron/R/bioc-release:/usr/local/lib/R/host-site-library -e PASSWORD=rstudiopassword -p 8787:8787 \
--env "DISPLAY" \
--volume "$HOME:$HOME" \
--workdir="`pwd`" \
bioconductor/bioconductor_full:release "$@"
(removing all those other things didn't have any effect on the network error)
I cannot explain that but maybe I'll look into it later this week.
but what that means is the solution for you is to remove the /tmp
from your volumes section in the bulker config file... I don't think we need it for anything specifically, actually, so I'll just remove it from the demo template. It was mostly just in there as an example, actually, that has just persisted, because I thought it might be useful for something...
I don't know if I want to go down the route of specifying 'exclude volumes', but I guess I could, if /tmp
needs to be present for all the other containers...
Just confirming that I reproduced this behavior on a second OSX machine. Network error with volumes: ['$HOME','/tmp']
in my bulker_config.yaml, but no problem starting rstudio-server with volumes: ['$HOME']
(after doing bulker load and activate again). I have no need at this point to 'exclude volumes', just not mounting /tmp is good enough for me.
I've been poking around at this and I cannot find any immediate reason why this would be a problem, specifically on mac. It has either to do with the way rstudio is set up to use /tmp, or the way the rocker pages are using the s6 init system, or something. In any case, since this is an edge case and we have an acceptable workaround, I'm going to close this issue rather than continue to try to figure it out. I will remove the /tmp from the default config.
I'm using the
waldronlab/bioconductor
manifest on hub.bulker.io, the config file at https://github.com/waldronlab/config/blob/master/bulker_config.yaml, and have updated mytemplates/docker_executable.jinja2
andtemplates/docker_shell.jinja2
to the ones on the dev branch (https://github.com/databio/bulker/tree/dev/bulker/templates). Now when I launchrstudio-dev
, I don't get any errors:However, when I try to use the rstudio server in my web browser at http://localhost:8787, I get an error "RStudio initialization error": "Error occurred during transmission". I noted that when I instead browsed to http://0.0.0.0:8787, rstudio did give me a login page, but after authentiating I got the same error. I couldn't reproduce that behavior, however: on subsequent launches, even after shutting down the rstudio process and restarting bulker, I got the "Error occurred during transmission" right away when browsing to either URL.