π Streamlining RStudio Server with Docker Compose!
π Streamlining RStudio Server with Docker Compose! π
Are you painful with Rstudio “can’t install library”, “use in different computer”, “different R version”, etc.
From problem I faced, after solving I share!
Remember my previous post about running RStudio Server in Docker? I have used very long command.
I've found an even more efficient way! π€©
Instead of wrestling with a lengthy docker run command below every times!
sudo docker run \
-v /home/namthip:/home/rstudio/namthip \
-v /home/namthip/R/host-site-library:/usr/local/lib/R/host-site-library \
-e R_LIBS_USER=/home/namthip/R/host-site-library \
-e PASSWORD= \
-p 8787:8787 \
bioconductor/bioconductor_docker:RELEASE_3_15
✅ Step 1: Create your `docker-compose.yml file`
version: "3.8"
services:
rstudio:
image: bioconductor/bioconductor_docker:RELEASE_3_15
ports:
- "8787:8787"
volumes:
- /home/namthip:/home/rstudio/namthip
- /home/namthip/R/host-site-library:/usr/local/lib/R/host-site-library
environment:
- R_LIBS_USER=/home/namthip/R/host-site-library
- PASSWORD=<MY_PASSWORD>
✅ Step 2: Launch RStudio Server:
Navigate to the directory where you saved docker-compose.yml.
Type this to start the container.
sudo docker compose up -d
Now, access RStudio Server by opening your browser and going to `localhost:8787`.
✅ Step 3: Shutting Down:
After finish using it, go to the directory you store docker-compose.yml
again.
Then stop docker container by typing.
sudo docker compose down
π Don't forget to do this before shutting down your computer!
Docker
Compose makes managing multi-container Docker applications a breeze,
and it's perfect for simplifying your RStudio Server setup. π»✨
▶️ Full info via my website: https://lnkd.in/gmTCD4Vp
hashtag Docker hashtag RStudio hashtag DataScience hashtag DockerCompose hashtag R hashtag
Comments
Post a Comment