Last active
June 26, 2020 16:25
-
-
Save reisner/d639b74db4c0b8b90697d0cc55030064 to your computer and use it in GitHub Desktop.
Installing Oracle libraries on Ubuntu, and ROracle in R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM rocker/r-ver:4.0.0-ubuntu18.04 | |
# Basic system Libraries | |
RUN export DEBIAN_FRONTEND=noninteractive; apt-get -y update \ | |
&& apt-get install -y \ | |
file \ | |
gdal-bin \ | |
libgdal-dev \ | |
libproj-dev \ | |
pandoc \ | |
pandoc-citeproc \ | |
zlib1g-dev \ | |
libssl-dev \ | |
openssh-client | |
# ************* ROracle related installations ************* | |
RUN export DEBIAN_FRONTEND=noninteractive && apt-get -y update && \ | |
apt-get install -y \ | |
alien \ | |
libaio1 \ | |
curl | |
# https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/index.html | |
ARG RPM_URL=https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage | |
# Download RPM packages: | |
ARG ORACLE_VERSION=18.3 | |
ARG ORACLE_FULL_VERSION=18.3.0.0.0-3 | |
RUN curl $RPM_URL/oracle-instantclient18.3-basic-$ORACLE_FULL_VERSION.x86_64.rpm --output oraclebasic.rpm && \ | |
curl $RPM_URL/oracle-instantclient18.3-devel-$ORACLE_FULL_VERSION.x86_64.rpm --output oracledev.rpm | |
# Convert and install packages: | |
RUN alien -i oraclebasic.rpm && \ | |
alien -i oracledev.rpm | |
# Remove package files: | |
RUN rm -rf *.rpm | |
# We need to set LD_LIBRARY_PATH for the install command below, | |
# as well as for running ROracle in R later: | |
ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/lib/oracle/$ORACLE_VERSION/client64/lib/ | |
RUN OCI_LIB=/usr/lib/oracle/$ORACLE_VERSION/client64/lib \ | |
OCI_INC=/usr/include/oracle/$ORACLE_VERSION/client64 \ | |
R -e 'install.packages("ROracle");' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment