Skip to content

Modify Official rstudio Dockerfile let it can import ROracle lib, and connect to Oracle DB

Notifications You must be signed in to change notification settings

Ethonwu/Rstudio-with-ROracle

Repository files navigation

Rstudio-with-ROracle

This repo is clone from https://github.com/rocker-org/rocker-versioned/tree/master/rstudio/3.5.1 Due to crocker-org RStudio docker can't import ROracle, so I modify it,let it can import

Why ROracle

Why

It can be use from another lib such as: ODBC, RJDBC

  1. ODBC need to setting config from OS, I think is very complicated, due to this env is Docker
  2. RJDBC need to install Java, and get some Jar file, although do not set config from OS, but need to install Java

ROracle

  • ROracle, this lib is recommand by my friend Rocky, and I foind this Oracle blog
  • This is my install lib reference, in this article is using oracle 12.1 version , my version is oracle 12.2 version , the connect OracleDB version is only require for OracleDB 12

Package version info

  1. R: 3.5.1
  2. Java: openjdk 1.8
  3. Oracle Instantclient: 12.2
  4. DBI: 1.0.0
  5. ROracle: 1.3-1

Another Oracle Instantclient version

  • Instantclient 18.5, it can connect OracleDB for version 18 if want to use see here

Usage

  • It is same as here
  • Below command is copy from here link, if need more option you can access link find something

Quickstart

docker run --rm -p 8787:8787 -e PASSWORD=yourpasswordhere ethonwu/roracle:fix

Bypassing the authentication step

docker run --rm \
  -p 127.0.0.1:8787:8787 \
  -e DISABLE_AUTH=true \
  ethonwu/roracle:fix

Using Dockerfile Build

  1. Clone this repo
git clone https://github.com/Ethonwu/Rstudio-with-ROracle.git
  1. Run docker build
docker build -t rstudio:test .
  1. Enjoy your building

Connect to oracle code example

  • Here is an example to connect OracleDB
library(DBI)
library(ROracle)
conn = dbConnect(dbDriver("Oracle"),username="USERNAME",password="PASSWORD",dbname="IP:PORT/DBNAME")
dbGetQuery(conn, "Query here")

TODO

  • ADD OracleDB images to test connect
  • Test on another lib such ODBC , RJDBC....
  • Testing to connect another DB

About

Modify Official rstudio Dockerfile let it can import ROracle lib, and connect to Oracle DB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published