

v /home/tommytang:/home/rstudio/tommytang mounts /home/tommytang in your VM to the docker container directory /home/rstudio/tommytang so Rstudio in the container can see your files in your VM. e R_LIBS_USER=/home/tommytang/R/host-site-library \īioconductor/bioconductor_docker:RELEASE_3_15 v /home/tommytang/R/host-site-library:/usr/local/lib/R/host-site-library \ v /home/tommytang:/home/rstudio/tommytang \ # make the dir writable for Rstudio to install custom R packagesĬhmod a+w -R /home/tommytang/R/host-site-library Verify it works sudo docker run hello-worldĬreate a folder for R library outside the containter in your home directory on the VM. Sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin $(lsb_release -cs) stable" | sudo tee /etc/apt//docker.list > /dev/null If you created your VM using ubuntu as the boot disk, you should follow theĬurl -fsSL | sudo gpg -dearmor -o /etc/apt/keyrings/docker.gpg Follow the process using the console Install docker
