drocker is a docker-compose wrapper on top of rocker/ropensci This is a starting point for a new R project.
The instructions below have been tested on Ubuntu 16.04. Adapt them as required for your own OS.
- Download and install Docker. Community Edition will work fine.
sudo apt update sudo apt install docker-ce docker-compose - Clone this repo
git clone [email protected]:askrht/drocker.git - Start the docker image. This downloads approximately 4 GB of Docker images, first time.
cd drocker docker-compose up -d - Stop the containers when you are done
docker-compose down
- You can access RStudio at localhost:8787. It takes about 2 minutes for it to launch, the first time.
- RStudio files are saved under /docs
- Modify drocker/Dockerfile
- Stop the container, remove the exsiting drocker image and bring it up again
docker-compose down && docker rmi drocker_drocker && docker-compose up -d - You can enter the running container to check which packges are installed, like so:
docker exec -it drocker_drocker_1 bash R > library("tidyverse") > installed.packages() %>% grep(pattern="gsheet") %>% installed.packages()[.] [1] "gsheet"