diff --git a/OracleInstantClient/README.md b/OracleInstantClient/README.md index 8d6fe44f2c..0d95787918 100644 --- a/OracleInstantClient/README.md +++ b/OracleInstantClient/README.md @@ -1,55 +1,81 @@ # About this Container Image -These container images are for the Oracle Instant Client 'Basic', 'SDK' and 'SQL\*Plus' packages. They can be used to build and run Oracle Call Interface (OCI), Oracle C++ Call Interface (OCCI), and JDBC-OCI applications applications. The SQL\*Plus command-line query tool allows quick ad-hoc SQL and PL/SQL execution. The container images can be extended with optional packages for ODBC, or to include tools such as Oracle SQL\*Loader. - -The base images support building and using scripting language APIs that internally call OCI. These include [Python's cx_Oracle](https://yum.oracle.com/oracle-linux-python.html), [Node.js's node-oracledb](https://yum.oracle.com/oracle-linux-nodejs.html), [PHP's OCI8](https://yum.oracle.com/oracle-linux-php.html), [Go's goracle](https://github.com/go-goracle/goracle) and [Ruby's ruby-oci8](https://www.rubydoc.info/github/kubo/ruby-oci8). +These container images are for the Oracle Instant Client 'Basic', 'SDK' and +'SQL\*Plus' packages. They can be used to build and run Oracle Call Interface +(OCI), Oracle C++ Call Interface (OCCI), and JDBC-OCI applications applications. +The SQL\*Plus command-line query tool allows quick ad-hoc SQL and PL/SQL +execution. The container images can be extended with optional Instant Client +packages for ODBC, or to include tools such as Oracle SQL\*Loader. + +The base images support building and using scripting language APIs that +internally call OCI. These include [Python's +cx_Oracle](https://yum.oracle.com/oracle-linux-python.html), [Node.js's +node-oracledb](https://yum.oracle.com/oracle-linux-nodejs.html), [PHP's +OCI8](https://yum.oracle.com/oracle-linux-php.html), [Go's +godror](https://godror.github.io/godror/) and [Ruby's +ruby-oci8](https://www.rubydoc.info/github/kubo/ruby-oci8). ## About Oracle Instant Client -The [Oracle Instant Client](https://www.oracle.com/technetwork/database/features/instant-client/) is a repackaging of Oracle Database libraries, tools and header files usable to create and run applications that connect to a remote (or local) Oracle Database. - -Oracle client-server version interoperability is detailed in [Doc ID 207303.1](https://support.oracle.com/epmos/faces/DocumentDisplay?id=207303.1). In summary, applications using Oracle Call Interface (OCI) 19, 18 and 12.2 can connect to Oracle Database 11.2 or later. Some tools may have other restrictions. +The [Oracle Instant +Client](https://www.oracle.com/database/technologies/instant-client.html) is a +repackaging of Oracle Database libraries, tools and header files usable to +create and run applications that connect to a remote (or local) Oracle Database. -From release 18.3, the Oracle Instant Client RPMs for Oracle Linux are available for direct download from the [Oracle Linux yum server](https://yum.oracle.com) without requiring manual license acceptance. +Oracle client-server version interoperability is detailed in [Doc ID +207303.1](https://support.oracle.com/epmos/faces/DocumentDisplay?id=207303.1). +In summary, applications using Oracle Call Interface (OCI) 19, 18 and 12.2 can +connect to Oracle Database 11.2 or later. Some tools may have other +restrictions. -## Building the Oracle Instant Client 19 Image +## Building the Oracle Instant Client 19 Images -Change directory to [`dockerfiles/19`](dockerfiles/19) and run: +Change directory to [`oraclelinux7/19`](oraclelinux7/19) or +[`oraclelinux8/19`](oraclelinux8/19)and run: ``` docker build --pull -t oracle/instantclient:19 . ``` -The build process automatically installs Instant Client using RPMs directly from the [Oracle Instant Client repository](https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/index.html) on the [Oracle Linux yum server](https://yum.oracle.com). +The build process automatically installs Instant Client using RPMs directly from +the [Oracle Instant Client repository +(OL7)](https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/index.html) +or [Oracle Instant Client repository +(OL8)](https://yum.oracle.com/repo/OracleLinux/OL8/oracle/instantclient/x86_64/index.html). Applications using Oracle Call Interface (OCI) 19 can connect to Oracle Database 11.2 or later. Some tools may have other restrictions. -## Building the Oracle Instant Client 18 Image +## Building the Oracle Instant Client 18 Image for Oracle Linux 7 -Change directory to [`dockerfiles/18`](dockerfiles/18) and run: +Change directory to [`oraclelinux7/18`](oraclelinux7/18) and run: ``` docker build --pull -t oracle/instantclient:18 . ``` -The build process will automatically install the Instant Client using RPMs sourced directly from the [Oracle Instant Client repository](https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/index.html) on the [Oracle Linux yum server](https://yum.oracle.com). +The build process will automatically install the Instant Client using RPMs +sourced directly from the [Oracle Instant Client +repository](https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/index.html). Applications using Oracle Call Interface (OCI) 18 can connect to Oracle Database 11.2 or later. Some tools may have other restrictions. -## Building the Oracle Instant Client 12.2 Image +## Building the Oracle Instant Client 12.2 Image for Oracle Linux 7 -Download the following three RPMs from the [Instant Client download page](https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html) on the Oracle Technology Network: +Download the following three RPMs from the [Instant Client download +page](https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html) +on the Oracle Technology Network: - `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` Place the downloaded Oracle Instant Client RPMs (from the previous step) in the -[`dockerfiles/12.2.0.1`](dockerfiles/12.2.0.1) directory, then switch to that directory and run: +[`oraclelinux7/12.2.0.1`](oraclelinux7/12.2.0.1) directory, then switch to that +directory and run: ``` docker build --pull -t oracle/instantclient:12.2.0.1 . @@ -103,15 +129,18 @@ mounts](https://docs.docker.com/storage/bind-mounts/). If you have a wallet zip downloaded from an Oracle Cloud Database then you should unzip it and, in this example, place the extracted files in `/my/host/wallet_dir` on your host. Cloud database wallets provide connection -strings for the database service and enable TLS. Your container applications -should use one of the connection strings from `tnsnames.ora` and also supply a -valid database username and password for connection. If you are using C based -applications (including database drivers for Python, Node.js, Go, Ruby or PHP) -you only need the `tnsnames.ora`, `sqlnet.ora` and `cwallet.sso` files from the -zip file. Keep the files secure. +strings for the database service and enable mutual TLS. Your container +applications should use one of the connection strings from `tnsnames.ora` and +also supply a valid database username and password for connection. If you are +using C based applications (including database drivers for Python, Node.js, Go, +Ruby or PHP) you only need the `tnsnames.ora`, `sqlnet.ora` and `cwallet.sso` +files from the zip file. Keep the files secure. ## Adding Oracle Database Drivers -To extend the image with optional Oracle Database drivers, follow your desired driver installation steps. The Instant Client libraries are in `/usr/lib/oracle//client64/lib` and the Instant Client headers are in `/usr/include/oracle//client64/`. +To extend the image with optional Oracle Database drivers, follow your desired +driver installation steps. The Instant Client libraries are in +`/usr/lib/oracle//client64/lib` and the Instant Client headers are in +`/usr/include/oracle//client64/`. The Instant Client libraries are in the default library search path. diff --git a/OracleInstantClient/dockerfiles/12.2.0.1/Dockerfile b/OracleInstantClient/oraclelinux7/12.2.0.1/Dockerfile similarity index 100% rename from OracleInstantClient/dockerfiles/12.2.0.1/Dockerfile rename to OracleInstantClient/oraclelinux7/12.2.0.1/Dockerfile diff --git a/OracleInstantClient/dockerfiles/18/Dockerfile b/OracleInstantClient/oraclelinux7/18/Dockerfile similarity index 100% rename from OracleInstantClient/dockerfiles/18/Dockerfile rename to OracleInstantClient/oraclelinux7/18/Dockerfile diff --git a/OracleInstantClient/dockerfiles/19/Dockerfile b/OracleInstantClient/oraclelinux7/19/Dockerfile similarity index 93% rename from OracleInstantClient/dockerfiles/19/Dockerfile rename to OracleInstantClient/oraclelinux7/19/Dockerfile index 0bcbe8955c..553c76ef05 100644 --- a/OracleInstantClient/dockerfiles/19/Dockerfile +++ b/OracleInstantClient/oraclelinux7/19/Dockerfile @@ -9,7 +9,7 @@ # # Execute: # $ docker build --pull -t oracle/instantclient:19 . -# $ docker run -ti --rm oracle/instantclient:19 sqlplus hr@example.com/orclpdb1 +# $ docker run -ti --rm oracle/instantclient:19 sqlplus -l hr@example.com/orclpdb1 # # NOTES # ----- @@ -44,7 +44,8 @@ # ORACLE INSTANT CLIENT PACKAGES # ------------------------------ # -# Instant Client Packages are available from https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/index.html +# Instant Client Packages for Oracle Linux 7 are available from +# https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/index.html # # Base - one of these packages is required to run applications and tools # oracle-instantclientXX.Y-basic : Basic Package - All files required to run OCI, OCCI, and JDBC-OCI applications diff --git a/OracleInstantClient/oraclelinux8/19/Dockerfile b/OracleInstantClient/oraclelinux8/19/Dockerfile new file mode 100644 index 0000000000..b7164b6cb3 --- /dev/null +++ b/OracleInstantClient/oraclelinux8/19/Dockerfile @@ -0,0 +1,79 @@ +# LICENSE UPL 1.0 +# +# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. +# +# Container image template for Oracle Instant Client +# +# HOW TO BUILD THIS IMAGE AND RUN A CONTAINER +# -------------------------------------------- +# +# Execute: +# $ docker build --pull -t oracle/instantclient:19 . +# $ docker run -ti --rm oracle/instantclient:19 sqlplus hr@example.com/orclpdb1 +# +# NOTES +# ----- +# +# Applications using Oracle Call Interface (OCI) 19 can connect to +# Oracle Database 11.2 or later. Some tools may have other +# restrictions. +# +# Oracle Instant Client 19 automatically configures the global library search +# path to include Instant Client libraries. +# +# OPTIONAL ORACLE CONFIGURATION FILES +# ----------------------------------- +# +# Optional Oracle Network and Oracle client configuration files can be put in the +# default configuration file directory /usr/lib/oracle//client64/lib/network/admin. +# Configuration files include tnsnames.ora, sqlnet.ora, oraaccess.xml and +# cwallet.sso. You can use a Docker volume to mount the directory containing +# the files at runtime, for example: +# +# docker run -v /my/host/wallet_dir:/usr/lib/oracle/19.9/client64/lib/network/admin:Z,ro . . . +# +# This avoids embedding private information such as wallets in images. If you +# do choose to include network configuration files in images, you can use a +# Dockerfile COPY, for example: +# +# COPY tnsnames.ora sqlnet.ora /usr/lib/oracle/${release}.${update}/client64/lib/network/admin/ +# +# There is no need to set the TNS_ADMIN environment variable when files are in +# the container's default configuration file directory, as shown. +# +# ORACLE INSTANT CLIENT PACKAGES +# ------------------------------ +# +# Instant Client Packages for Oracle Linux 8 are available from +# https://yum.oracle.com/repo/OracleLinux/OL8/oracle/instantclient/x86_64/index.html +# +# Base - one of these packages is required to run applications and tools +# oracle-instantclientXX.Y-basic : Basic Package - All files required to run OCI, OCCI, and JDBC-OCI applications +# oracle-instantclientXX.Y-basiclite : Basic Light Package - Smaller version of the Basic package, with only English error messages and Unicode, ASCII, and Western European character set support +# +# Tools - optional packages (requires the 'basic' package) +# oracle-instantclientXX.Y-sqlplus : SQL*Plus Package - The SQL*Plus command line tool for SQL and PL/SQL queries +# oracle-instantclientXX.Y-tools : Tools Package - Includes Data Pump, SQL*Loader and Workload Replay Client +# +# Development and Runtime - optional packages (requires the 'basic' package) +# oracle-instantclientXX.Y-devel : SDK Package - Additional header files and an example makefile for developing Oracle applications with Instant Client +# oracle-instantclientXX.Y-jdbc : JDBC Supplement Package - Additional support for Internationalization under JDBC +# oracle-instantclientXX.Y-odbc : ODBC Package - Additional libraries for enabling ODBC applications +# + +FROM oraclelinux:8-slim + +LABEL "provider"="Oracle" \ + "issues"="https://github.com/oracle/docker-images/issues" + +ARG release=19 +ARG update=9 + +RUN microdnf install oracle-release-el8 && \ + microdnf install oracle-instantclient${release}.${update}-basic oracle-instantclient${release}.${update}-devel oracle-instantclient${release}.${update}-sqlplus && \ + microdnf clean all + +# Uncomment if the tools package is added +# ENV PATH=$PATH:/usr/lib/oracle/${release}.${update}/client64/bin + +CMD ["sqlplus", "-v"]