RStudio Server documentation.
https://faun.pub/set-current-host-user-for-docker-container-4e521cef9ffc https://www.cyberciti.biz/faq/linux-change-user-group-uid-gid-for-all-owned-files/
I found that it was easy to change the id of the container to fit the host one. I have to execute in container
usermod -u 1002 giuliano
usr: rstudio pswd: eRtf321-a2 [DEFAULT]
See this instructions which worked fine in MGS RStudio docker container: https://www.r-bloggers.com/2018/02/installing-rjava-on-ubuntu/
...
From scratch:
- build_bookcraft.sh --> A) build.sh --> Dockerfile B) Dockerfile_bookcraft
- rerun_bookcraft.sh
?To change the user and group IDs:
- ?build_uid.sh
The web app is available to students at http:https://rstudio-classroom.ddns.net/
It is based on the docker container rstudio-didattica using a docker port 8686 which is redirected to the public url above.
From scratch:
- build_from_scratch_and_save.sh --> build.sh --> Dockerfile
- [build_uid.sh]
- rerun_didactics.sh
- install_dep.sh
To change the user and group IDs:
- build_uid.sh
Using the docker hub stored image rstudio_research:
- fetch_research.sh
- [build_uid.sh]
- rerun_research.sh
From scratch:
- build_from_scratch_and_save.sh --> build.sh --> Dockerfile
- [build_uid.sh]
- rerun_research.sh
- install_dep.sh
To change the user and group IDs:
- build_uid.sh
See fetch script for the most up-to-date version:
docker pull giulange/pedometrics:rstudio-research-run1
docker tag giulange/pedometrics:rstudio-research-run1 rstudio_research
docker image rm giulange/pedometrics:rstudio-research-run1
-
Documentation goto https://docs.rstudio.com/ide/server-pro/index.html
-
In case of the issue "Unable to connect to service (1)" run
docker logs
and check if there's a problem writing the PID file, such asvar/run/rstudio-server/rstudio-rsession/giuliano-d.pid
. In that case, delete the PID file manually and it works. -
In case of issues with a Student not able to access the session, follow instructions given here, that is:
LATEST:
-
enter the docker
-
go to user home
-
mv folders according to the following
Choose which directory or directories to rename, via the command
sudo mv /home/user1/.local/share/rstudio /home/user1/.local/share/rstudio-old
for example. This table shows the impact of the directory removal.
Location When deleted ~/.config/rstudio/ All user settings (Global Options) lost ~/.local/share/rstudio/ All open files, tabs, and sessions deleted
In most cases, you will only need to rename the
.local/share/rstudio
directory to clear out the sessions, and the user settings are retained. Rename both directories to mimic a fresh installation for that user.
OLD-FASHIONED:
- enter the docker
- go to user home, e.g. cd /home/Gaspare.Abate
- mv the .rstudio folder to .rstudio_old
- problem fixed
After the execution of /home/giuliano/git/rstudio-classroom/research/rerun_research.sh rstudio_research
.
I was unable to login in the webapp.
In order to fix it, I had to remove the /var/run/rstudio-server/rstudio-rsession/giuliano-d.pid file which have uid/gid 3002.
The user giuliano (id=1000) inside the container was unable to write/remove this pid.
This issue raise when I run the rerun_research.sh
script.
Get the list of students with active sessions
rstudio-server active-sessions
Restart RStudio Server
rstudio-server restart
Rocker docker image --> https://hub.docker.com/r/rocker/rstudio
Notes on docker see --> docker/README.md
1.\ run build.sh [once!] 2.\ run run_research.sh OR run_students.sh 3.\ run install_dep.sh [changing argument container]
4.\ run users_create.sh OR users_create_with_fullName.sh [only for students] 5.\ run add_DOCENTI.sh [configure add_DOCENTE_2_rstudio.sh & add_DOCENTI.sh before time]
4.\ run create_CLASS_*.sh with calls add_USER_2_rstudio.sh adding both students and docenti