Skip to content

Instantly share code, notes, and snippets.

@marcelomx
Created May 27, 2022 20:32
Show Gist options
  • Save marcelomx/63c7724899c93ff696f40b61500f6663 to your computer and use it in GitHub Desktop.
Save marcelomx/63c7724899c93ff696f40b61500f6663 to your computer and use it in GitHub Desktop.
Oracle Instant Client (Oracle 12)
# LICENSE UPL 1.0
#
# Copyright (c) 2014-2015 Oracle and/or its affiliates. All rights reserved.
#
# ORACLE DOCKERFILES PROJECT
# --------------------------
#
# Dockerfile template for Oracle Instant Client
#
# REQUIRED FILES TO BUILD THIS IMAGE
# ==================================
#
# From http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
# Download the following three RPMs:
# - oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm
# - oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm
# - oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm
#
# HOW TO BUILD THIS IMAGE
# -----------------------
# Put all downloaded files in the same directory as this Dockerfile
# Run:
# $ docker build -t oracle/instantclient:12.2.0.1 .
#
#
FROM oraclelinux:7-slim
ADD oracle-instantclient*.rpm /tmp/
RUN yum -y install /tmp/oracle-instantclient*.rpm && \
rm -rf /var/cache/yum && \
rm -f /tmp/oracle-instantclient*.rpm && \
echo /usr/lib/oracle/12.2/client64/lib > /etc/ld.so.conf.d/oracle-instantclient12.2.conf && \
ldconfig && \
# Prepare include e libs directories on /usr/lib/oracle to be imported by other images
ln -s /usr/include/oracle/12.2/client64 /usr/lib/oracle/12.2/client64/include && \
mkdir /usr/lib/oracle/12.2/client64/rdbms && \
ln -s /usr/include/oracle/12.2/client64 /usr/lib/oracle/12.2/client64/rdbms/public
ENV PATH=$PATH:/usr/lib/oracle/12.2/client64/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment