Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ drocker Public

docker compose for a new R project.

License

askrht/drocker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

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.

Start Here

  1. Download and install Docker. Community Edition will work fine.
    sudo apt update
    sudo apt install docker-ce docker-compose
    
  2. Clone this repo
    git clone [email protected]:askrht/drocker.git
    
  3. Start the docker image. This downloads approximately 4 GB of Docker images, first time.
    cd drocker
    docker-compose up -d
    
  4. Stop the containers when you are done
    docker-compose down
    

Useful links and folders

  1. You can access RStudio at localhost:8787. It takes about 2 minutes for it to launch, the first time.
  2. RStudio files are saved under /docs

Adding your packages to the Docker image

  1. Modify drocker/Dockerfile
  2. Stop the container, remove the exsiting drocker image and bring it up again
    docker-compose down && docker rmi drocker_drocker && docker-compose up -d
    
  3. 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"
    

About

docker compose for a new R project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published