Giter Site home page Giter Site logo

docker's Introduction

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].

docker's People

Contributors

cboettig avatar eddelbuettel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.