Coder Social home page Coder Social logo

docker's Introduction

DockeR

Get it dockeR? hardy har har har.

This is my attempt at running R and r studio in a docker container.

Motivation

I had issues with local java/snowflake connection. I hope this is a solution for this connection and allows our team to utilize R in a scalable way as this is my preferred language.

Tech/framework used

-Docker

Installation

  1. Install Docker (if you have not already) https://docs.docker.com/install/
  2. Clone this repo to your local machine
  3. Open your terminal and navigate into the folder DockeR (relative paths require this)
cd projects/dockeR/
  1. Run the following. It will take awhile, be patient, it's worth it!
docker-compose up --build
  1. Open localhost:50 in a web browser.
  2. Be amazed by this miracle and send Alex a thank you ;)

Tests

In the project/files folder there is a test_hello_world.R file. Open it and run.

Yes the R jokes never end!

How to use?

Each time you start up the container just run

docker-compose up

To stop the container use ctrl c.

You can run the container in detached mode

docker-compose up -d

BUT BEWARE that you will need to shut it down later and we don't want to forget

docker-compose down

Now that you are set up, code in either R environment. The only change is that you will need to add to the file install_packages.R and rebuild the docker container (docker compose up --build) if you need other libraries. Note that you can specify versions here too

require(devtools)
install_version("ggplot2", version = "0.9.1", repos = "http://cran.us.r-project.org")

Credits

Big thanks to https://www.rocker-project.org for developing all these base images for R!

Also thanks to Vladimir Zhbanko for his work that helped me learn! -https://www.youtube.com/watch?v=JHn7zADtFGM -https://github.com/vladdsm/docker-r-h2o-tidyverse

Alex Blohm

docker's People

Stargazers

 avatar

Watchers

James Cloos avatar  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.