Skip to content

Commit de61316

Browse files
authored
Add OL8 Dockerfile for Instant Client 19 (#1770)
Signed-off-by: Christopher Jones <[email protected]>
1 parent 88242bb commit de61316

File tree

5 files changed

+134
-25
lines changed

5 files changed

+134
-25
lines changed

OracleInstantClient/README.md

+52-23
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,81 @@
11
# About this Container Image
22

3-
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.
4-
5-
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).
3+
These container images are for the Oracle Instant Client 'Basic', 'SDK' and
4+
'SQL\*Plus' packages. They can be used to build and run Oracle Call Interface
5+
(OCI), Oracle C++ Call Interface (OCCI), and JDBC-OCI applications applications.
6+
The SQL\*Plus command-line query tool allows quick ad-hoc SQL and PL/SQL
7+
execution. The container images can be extended with optional Instant Client
8+
packages for ODBC, or to include tools such as Oracle SQL\*Loader.
9+
10+
The base images support building and using scripting language APIs that
11+
internally call OCI. These include [Python's
12+
cx_Oracle](https://yum.oracle.com/oracle-linux-python.html), [Node.js's
13+
node-oracledb](https://yum.oracle.com/oracle-linux-nodejs.html), [PHP's
14+
OCI8](https://yum.oracle.com/oracle-linux-php.html), [Go's
15+
godror](https://godror.github.io/godror/) and [Ruby's
16+
ruby-oci8](https://www.rubydoc.info/github/kubo/ruby-oci8).
617

718
## About Oracle Instant Client
819

9-
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.
10-
11-
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.
20+
The [Oracle Instant
21+
Client](https://www.oracle.com/database/technologies/instant-client.html) is a
22+
repackaging of Oracle Database libraries, tools and header files usable to
23+
create and run applications that connect to a remote (or local) Oracle Database.
1224

13-
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.
25+
Oracle client-server version interoperability is detailed in [Doc ID
26+
207303.1](https://support.oracle.com/epmos/faces/DocumentDisplay?id=207303.1).
27+
In summary, applications using Oracle Call Interface (OCI) 19, 18 and 12.2 can
28+
connect to Oracle Database 11.2 or later. Some tools may have other
29+
restrictions.
1430

15-
## Building the Oracle Instant Client 19 Image
31+
## Building the Oracle Instant Client 19 Images
1632

17-
Change directory to [`dockerfiles/19`](dockerfiles/19) and run:
33+
Change directory to [`oraclelinux7/19`](oraclelinux7/19) or
34+
[`oraclelinux8/19`](oraclelinux8/19)and run:
1835

1936
```
2037
docker build --pull -t oracle/instantclient:19 .
2138
```
2239

23-
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).
40+
The build process automatically installs Instant Client using RPMs directly from
41+
the [Oracle Instant Client repository
42+
(OL7)](https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/index.html)
43+
or [Oracle Instant Client repository
44+
(OL8)](https://yum.oracle.com/repo/OracleLinux/OL8/oracle/instantclient/x86_64/index.html).
2445

2546
Applications using Oracle Call Interface (OCI) 19 can connect to
2647
Oracle Database 11.2 or later. Some tools may have other
2748
restrictions.
2849

29-
## Building the Oracle Instant Client 18 Image
50+
## Building the Oracle Instant Client 18 Image for Oracle Linux 7
3051

31-
Change directory to [`dockerfiles/18`](dockerfiles/18) and run:
52+
Change directory to [`oraclelinux7/18`](oraclelinux7/18) and run:
3253

3354
```
3455
docker build --pull -t oracle/instantclient:18 .
3556
```
3657

37-
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).
58+
The build process will automatically install the Instant Client using RPMs
59+
sourced directly from the [Oracle Instant Client
60+
repository](https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/index.html).
3861

3962
Applications using Oracle Call Interface (OCI) 18 can connect to
4063
Oracle Database 11.2 or later. Some tools may have other
4164
restrictions.
4265

43-
## Building the Oracle Instant Client 12.2 Image
66+
## Building the Oracle Instant Client 12.2 Image for Oracle Linux 7
4467

45-
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:
68+
Download the following three RPMs from the [Instant Client download
69+
page](https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html)
70+
on the Oracle Technology Network:
4671

4772
- `oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm`
4873
- `oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm`
4974
- `oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm`
5075

5176
Place the downloaded Oracle Instant Client RPMs (from the previous step) in the
52-
[`dockerfiles/12.2.0.1`](dockerfiles/12.2.0.1) directory, then switch to that directory and run:
77+
[`oraclelinux7/12.2.0.1`](oraclelinux7/12.2.0.1) directory, then switch to that
78+
directory and run:
5379

5480
```
5581
docker build --pull -t oracle/instantclient:12.2.0.1 .
@@ -103,15 +129,18 @@ mounts](https://docs.docker.com/storage/bind-mounts/).
103129
If you have a wallet zip downloaded from an Oracle Cloud Database then you
104130
should unzip it and, in this example, place the extracted files in
105131
`/my/host/wallet_dir` on your host. Cloud database wallets provide connection
106-
strings for the database service and enable TLS. Your container applications
107-
should use one of the connection strings from `tnsnames.ora` and also supply a
108-
valid database username and password for connection. If you are using C based
109-
applications (including database drivers for Python, Node.js, Go, Ruby or PHP)
110-
you only need the `tnsnames.ora`, `sqlnet.ora` and `cwallet.sso` files from the
111-
zip file. Keep the files secure.
132+
strings for the database service and enable mutual TLS. Your container
133+
applications should use one of the connection strings from `tnsnames.ora` and
134+
also supply a valid database username and password for connection. If you are
135+
using C based applications (including database drivers for Python, Node.js, Go,
136+
Ruby or PHP) you only need the `tnsnames.ora`, `sqlnet.ora` and `cwallet.sso`
137+
files from the zip file. Keep the files secure.
112138

113139
## Adding Oracle Database Drivers
114140

115-
To extend the image with optional Oracle Database drivers, follow your desired driver installation steps. The Instant Client libraries are in `/usr/lib/oracle/<version>/client64/lib` and the Instant Client headers are in `/usr/include/oracle/<version>/client64/`.
141+
To extend the image with optional Oracle Database drivers, follow your desired
142+
driver installation steps. The Instant Client libraries are in
143+
`/usr/lib/oracle/<version>/client64/lib` and the Instant Client headers are in
144+
`/usr/include/oracle/<version>/client64/`.
116145

117146
The Instant Client libraries are in the default library search path.

OracleInstantClient/dockerfiles/19/Dockerfile renamed to OracleInstantClient/oraclelinux7/19/Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#
1010
# Execute:
1111
# $ docker build --pull -t oracle/instantclient:19 .
12-
# $ docker run -ti --rm oracle/instantclient:19 sqlplus [email protected]/orclpdb1
12+
# $ docker run -ti --rm oracle/instantclient:19 sqlplus -l [email protected]/orclpdb1
1313
#
1414
# NOTES
1515
# -----
@@ -44,7 +44,8 @@
4444
# ORACLE INSTANT CLIENT PACKAGES
4545
# ------------------------------
4646
#
47-
# Instant Client Packages are available from https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/index.html
47+
# Instant Client Packages for Oracle Linux 7 are available from
48+
# https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/index.html
4849
#
4950
# Base - one of these packages is required to run applications and tools
5051
# oracle-instantclientXX.Y-basic : Basic Package - All files required to run OCI, OCCI, and JDBC-OCI applications
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# LICENSE UPL 1.0
2+
#
3+
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
4+
#
5+
# Container image template for Oracle Instant Client
6+
#
7+
# HOW TO BUILD THIS IMAGE AND RUN A CONTAINER
8+
# --------------------------------------------
9+
#
10+
# Execute:
11+
# $ docker build --pull -t oracle/instantclient:19 .
12+
# $ docker run -ti --rm oracle/instantclient:19 sqlplus [email protected]/orclpdb1
13+
#
14+
# NOTES
15+
# -----
16+
#
17+
# Applications using Oracle Call Interface (OCI) 19 can connect to
18+
# Oracle Database 11.2 or later. Some tools may have other
19+
# restrictions.
20+
#
21+
# Oracle Instant Client 19 automatically configures the global library search
22+
# path to include Instant Client libraries.
23+
#
24+
# OPTIONAL ORACLE CONFIGURATION FILES
25+
# -----------------------------------
26+
#
27+
# Optional Oracle Network and Oracle client configuration files can be put in the
28+
# default configuration file directory /usr/lib/oracle/<version>/client64/lib/network/admin.
29+
# Configuration files include tnsnames.ora, sqlnet.ora, oraaccess.xml and
30+
# cwallet.sso. You can use a Docker volume to mount the directory containing
31+
# the files at runtime, for example:
32+
#
33+
# docker run -v /my/host/wallet_dir:/usr/lib/oracle/19.9/client64/lib/network/admin:Z,ro . . .
34+
#
35+
# This avoids embedding private information such as wallets in images. If you
36+
# do choose to include network configuration files in images, you can use a
37+
# Dockerfile COPY, for example:
38+
#
39+
# COPY tnsnames.ora sqlnet.ora /usr/lib/oracle/${release}.${update}/client64/lib/network/admin/
40+
#
41+
# There is no need to set the TNS_ADMIN environment variable when files are in
42+
# the container's default configuration file directory, as shown.
43+
#
44+
# ORACLE INSTANT CLIENT PACKAGES
45+
# ------------------------------
46+
#
47+
# Instant Client Packages for Oracle Linux 8 are available from
48+
# https://yum.oracle.com/repo/OracleLinux/OL8/oracle/instantclient/x86_64/index.html
49+
#
50+
# Base - one of these packages is required to run applications and tools
51+
# oracle-instantclientXX.Y-basic : Basic Package - All files required to run OCI, OCCI, and JDBC-OCI applications
52+
# 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
53+
#
54+
# Tools - optional packages (requires the 'basic' package)
55+
# oracle-instantclientXX.Y-sqlplus : SQL*Plus Package - The SQL*Plus command line tool for SQL and PL/SQL queries
56+
# oracle-instantclientXX.Y-tools : Tools Package - Includes Data Pump, SQL*Loader and Workload Replay Client
57+
#
58+
# Development and Runtime - optional packages (requires the 'basic' package)
59+
# oracle-instantclientXX.Y-devel : SDK Package - Additional header files and an example makefile for developing Oracle applications with Instant Client
60+
# oracle-instantclientXX.Y-jdbc : JDBC Supplement Package - Additional support for Internationalization under JDBC
61+
# oracle-instantclientXX.Y-odbc : ODBC Package - Additional libraries for enabling ODBC applications
62+
#
63+
64+
FROM oraclelinux:8-slim
65+
66+
LABEL "provider"="Oracle" \
67+
"issues"="https://github.com/oracle/docker-images/issues"
68+
69+
ARG release=19
70+
ARG update=9
71+
72+
RUN microdnf install oracle-release-el8 && \
73+
microdnf install oracle-instantclient${release}.${update}-basic oracle-instantclient${release}.${update}-devel oracle-instantclient${release}.${update}-sqlplus && \
74+
microdnf clean all
75+
76+
# Uncomment if the tools package is added
77+
# ENV PATH=$PATH:/usr/lib/oracle/${release}.${update}/client64/bin
78+
79+
CMD ["sqlplus", "-v"]

0 commit comments

Comments
 (0)