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

Skip to content

PasqualeDente/docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker for ROpenSci

This repository provides Dockerfiles for provisioning a completely portable environment for reproducible research in R.

Getting started:

On a Mac or Windows machine, you'll need boot2docker installed (easy point & click install, ~24 MB). ([Mac], [Windows]). Note: Requires a docker version >= 1.2, so please make sure you have a recent version of docker available. Linux users should use the curl script provided by Docker rather than the older version available in the distro repository. Docker only runs on 64 bit machines at this time.

  1. Launch boot2docker, and do:
sudo docker run -d -p 8787:8787 cboettig/ropensci

That will take a while to download the image the first time you run it.

  1. Once it is done, try:
boot2docker ip

that should return an ip address you can paste into your browser.

  1. Add a :8787 to the end of this address and paste it into your browser address bar. (e.g. it's probably http://92.168.59.103:8787 but that can change).

  2. You should get the RStudio welcome screen. you should be able to login with user/password rstudio/rstudio, and be able to run stuff, install packages, use git, etc.

On Ubuntu, other Linux flavors

Life is easier. Install the latest version of docker via a script: (Other flavors are similar, see: Docker's instructions for your favorite distro)

curl -sSL https://get.docker.io/ubuntu/ | sudo sh

Now we're good to roll:

sudo docker run -d -p 8787:8787 cboettig/ropensci

RStudio should now be at http://localhost:8787 with login as mentioned above.

Details and custom configuration

  • Customize the user name, password, and email address used in git config:
docker run -d -p 8787:8787 -e USER=<username> -e PASSWORD=<password> -e [email protected] cboettig/ropensci
  • Launch an R terminal session instead of using Rstudio
docker run --rm -it cboettig/ropensci /usr/bin/R
  • Launch a bash session
docker run --rm -it cboettig/ropensci /bin/bash
  • Link the container to a local folder (directory) using the -v option (linux only?). This acts much like running R in the working directory:
docker run --rm -it -v $(pwd):/home/rstudio/$(basename "$PWD") cboettig/ropensci /usr/bin/R
  • Use a lighter weight RStudio image: the commands above use the image named cboettig/ropensci from the Docker Hub, which includes many commonly used R packages (see Dockerfile under ropensci/ in thsi repo). For a lighter-weight image, use cboettig/rstudio.

Author

Carl Boettiger [email protected]

License

MIT

Trademark

RStudio and Shiny are registered trademarks of RStudio, Inc. The use and distribution of these RStudio Marks with the RStudio binaries through these images hosted on hub.docker.com has been granted by explicit permission of RStudio, as described under RStudio's trademark use policy. Address inqueries about further distribution or other questions to [email protected].

About

Docker image for R on Ubuntu

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 54.6%
  • Ruby 22.9%
  • Makefile 22.5%